提交 40c89bd2 编写于 作者: K kohsuke

Correctly detect the platform of the target node.

This is suspected to cause http://www.nabble.com/Re%3A-Launcher.isUnix%28%29-td22792399.html

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16724 71c3de6d-444a-0410-be80-ed276b4c234a
上级 2ab216a8
......@@ -1214,11 +1214,18 @@ public final class FilePath implements Serializable {
* that has this file.
* @since 1.89
*/
public Launcher createLauncher(TaskListener listener) {
public Launcher createLauncher(TaskListener listener) throws IOException, InterruptedException {
if(channel==null)
return new LocalLauncher(listener);
else
return new RemoteLauncher(listener,channel,isUnix());
return new RemoteLauncher(listener,channel,channel.call(new IsUnix()));
}
private static final class IsUnix implements Callable<Boolean,IOException> {
public Boolean call() throws IOException {
return File.pathSeparatorChar==':';
}
private static final long serialVersionUID = 1L;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册