未验证 提交 6414d071 编写于 作者: O Oleg Nenashev 提交者: GitHub

Merge pull request #3987 from jglick/slave-installer

[JENKINS-57071] Fixing problems affecting Linux agent installer modules
......@@ -155,7 +155,7 @@ public abstract class SU {
else // in production code this never happens, but during debugging this is convenient
args.add("-cp").add(slaveJar).add(hudson.remoting.Launcher.class.getName());
if(rootPassword==null) {
if (Util.fixEmptyAndTrim(rootPassword) == null) {
// try sudo, in the hope that the user has the permission to do so without password
return new LocalLauncher(listener).launchChannel(
args.prepend(sudoExe()).toCommandArray(),
......
......@@ -5,7 +5,6 @@ import hudson.ExtensionPoint;
import hudson.remoting.Channel;
import hudson.remoting.ChannelBuilder;
import hudson.slaves.SlaveComputer;
import jenkins.model.Jenkins;
import javax.annotation.Nullable;
......@@ -39,6 +38,6 @@ public abstract class ChannelConfigurator implements ExtensionPoint {
* All the registered {@link ChannelConfigurator}s.
*/
public static ExtensionList<ChannelConfigurator> all() {
return Jenkins.getInstance().getExtensionList(ChannelConfigurator.class);
return ExtensionList.lookup(ChannelConfigurator.class);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册