提交 4a02e17d 编写于 作者: S Seiji Sogabe

[JENKINS 9963] Fix CR/LF and always make it Unix style.

上级 5936e970
......@@ -63,6 +63,9 @@ Upcoming changes</a>
<li class=bug>
PAM authentication wasn't working with Ubuntu 11.04
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-9486">issue 9486</a>)
<li class=bug>
ToolCommandInstaller: Fix CR/LF and always make it Unix style.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-9963">issue 9963</a>)
<li class=rfe>
PAM authentication now works with CLI login mechanism.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-9681">issue 9681</a>)
......
......@@ -53,10 +53,21 @@ public class CommandInstaller extends ToolInstaller {
@DataBoundConstructor
public CommandInstaller(String label, String command, String toolHome) {
super(label);
this.command = command;
this.command = fixCrLf(command);
this.toolHome = toolHome;
}
/**
* Fix CR/LF and always make it Unix style.
*/
private static String fixCrLf(String s) {
// eliminate CR
int idx;
while((idx=s.indexOf("\r\n"))!=-1)
s = s.substring(0,idx)+s.substring(idx+1);
return s;
}
public String getCommand() {
return command;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册