Created
May 13, 2013 08:52
-
-
Save tota/5567018 to your computer and use it in GitHub Desktop.
日本語を含む Windowsバッチコマンドの実行の動作がおかしい件への対応(?) (ただし,Jenkins の Test がとおらなくなる)
cf. http://d.hatena.ne.jp/miau/20100929/1285768041
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
core/src/main/java/hudson/tasks/BatchFile.java | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/core/src/main/java/hudson/tasks/BatchFile.java b/core/src/main/java/hudson/tasks/BatchFile.java | |
index 0943e91..4f4c63a 100644 | |
--- a/core/src/main/java/hudson/tasks/BatchFile.java | |
+++ b/core/src/main/java/hudson/tasks/BatchFile.java | |
@@ -46,7 +46,7 @@ public class BatchFile extends CommandInterpreter { | |
} | |
protected String getContents() { | |
- return command+"\r\nexit %ERRORLEVEL%"; | |
+ return command.replaceAll("\r", "\r\n")+"\r\nexit %ERRORLEVEL%"; | |
} | |
protected String getFileExtension() { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment