mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 13:02:19 +00:00
checkChannel() provides a better error message in case you are not using Remoting mode.
This commit is contained in:
1 parent
98f227c20a
commit
45092f06a8
1 file changed
+2
-2
@@ -69,12 +69,12 @@ public abstract class AbstractPasswordBasedSecurityRealm extends SecurityRealm i
|
||||
|
||||
if (passwordFile!=null)
|
||||
try {
|
||||
password = new FilePath(command.channel,passwordFile).readToString().trim();
|
||||
password = new FilePath(command.checkChannel(), passwordFile).readToString().trim();
|
||||
} catch (IOException e) {
|
||||
throw new BadCredentialsException("Failed to read "+passwordFile,e);
|
||||
}
|
||||
if (password==null)
|
||||
password = command.channel.call(new InteractivelyAskForPassword());
|
||||
password = command.checkChannel().call(new InteractivelyAskForPassword());
|
||||
|
||||
if (password==null)
|
||||
throw new BadCredentialsException("No password specified");
|
||||
|
||||
Reference in new issue
Block a user