未验证 提交 d94049cc 编写于 作者: J Jesse Glick
上级 0fd8808b
......@@ -809,9 +809,14 @@ public class CLI implements AutoCloseable {
return authenticate(Collections.singleton(key));
}
/** For access from {@code HelpCommand}. */
static String usage() {
return Messages.CLI_Usage();
}
private static void printUsage(String msg) {
if(msg!=null) System.out.println(msg);
System.err.println(Messages.CLI_Usage());
System.err.println(usage());
}
static final Logger LOGGER = Logger.getLogger(CLI.class.getName());
......
......@@ -53,7 +53,7 @@ public class HelpCommand extends CLICommand {
protected int run() throws Exception {
if (!Jenkins.getActiveInstance().hasPermission(Jenkins.READ)) {
throw new AccessDeniedException("You must authenticate to access this Jenkins.\n"
+ hudson.cli.client.Messages.CLI_Usage());
+ CLI.usage());
}
if (command != null)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册