public void close() { Terminal.resetTerminal(); }
@Override public int main(List<String> args, Locale locale, InputStream stdin, PrintStream stdout, PrintStream stderr) { // this allows the caller to manipulate the JVM state, so require the admin privilege. Hudson.getInstance().checkPermission(Hudson.ADMINISTER); // TODO: ^as this class overrides main() (which has authentication stuff), // how to get ADMIN permission for this command? // this being remote means no jline capability is available System.setProperty("jline.terminal", UnsupportedTerminal.class.getName()); Terminal.resetTerminal(); Groovysh shell = createShell(stdin, stdout, stderr); return shell.run(args.toArray(new String[args.size()])); }
@Override public int main(List<String> args, Locale locale, InputStream stdin, PrintStream stdout, PrintStream stderr) { // this allows the caller to manipulate the JVM state, so require the admin privilege. Hudson.getInstance().checkPermission(Hudson.ADMINISTER); // TODO: ^as this class overrides main() (which has authentication stuff), // how to get ADMIN permission for this command? // this being remote means no jline capability is available System.setProperty("jline.terminal", UnsupportedTerminal.class.getName()); Terminal.resetTerminal(); Groovysh shell = createShell(stdin, stdout, stderr); return shell.run(args.toArray(new String[args.size()])); }
@Override public int main(List<String> args, Locale locale, InputStream stdin, PrintStream stdout, PrintStream stderr) { // this allows the caller to manipulate the JVM state, so require the admin privilege. Hudson.getInstance().checkPermission(Hudson.ADMINISTER); // TODO: ^as this class overrides main() (which has authentication stuff), // how to get ADMIN permission for this command? // this being remote means no jline capability is available System.setProperty("jline.terminal", UnsupportedTerminal.class.getName()); Terminal.resetTerminal(); Groovysh shell = createShell(stdin, stdout, stderr); return shell.run(args.toArray(new String[args.size()])); }