Evaluation of subshell String results are wrong on Windows
@@ -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;
