You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by gn...@apache.org on 2022/03/07 14:35:42 UTC
[felix-dev] branch master updated: [FELIX-6509] Evaluation of subshell String results are wrong on Windows
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/master by this push:
new e32a4f4 [FELIX-6509] Evaluation of subshell String results are wrong on Windows
e32a4f4 is described below
commit e32a4f45944736c8a42ccc4422f85aeeeb4743d7
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Mon Mar 7 15:35:22 2022 +0100
[FELIX-6509] Evaluation of subshell String results are wrong on Windows
---
gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java b/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java
index 8667b94..71d4844 100644
--- a/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java
+++ b/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java
@@ -385,7 +385,7 @@ public class Closure implements Function, Evaluate
return result;
} else {
String s = baos.toString();
- while (!s.isEmpty() && s.charAt(s.length() - 1) == '\n') {
+ while (!s.isEmpty() && (s.charAt(s.length() - 1) == '\n' || s.charAt(s.length() - 1) == '\r')) {
s = s.substring(0, s.length() - 1);
}
return s;