Updated prompt and some messages.
This commit is contained in:
parent
883c37fcac
commit
9c4eca45ce
@ -47,7 +47,7 @@ public class ConsoleWrapper {
|
|||||||
|
|
||||||
public String readPassword() throws JSCliException {
|
public String readPassword() throws JSCliException {
|
||||||
try {
|
try {
|
||||||
String pw = cons.readLine("password:", new Character('*'));
|
String pw = cons.readLine("Password: ", new Character('*'));
|
||||||
cons.setDefaultPrompt(prompt);
|
cons.setDefaultPrompt(prompt);
|
||||||
return pw;
|
return pw;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -14,7 +14,7 @@ public class Main {
|
|||||||
CommandlineParser cmdParser = new CommandlineParser(args);
|
CommandlineParser cmdParser = new CommandlineParser(args);
|
||||||
String runAs = cmdParser.getRunAs();
|
String runAs = cmdParser.getRunAs();
|
||||||
console = new ConsoleWrapper();
|
console = new ConsoleWrapper();
|
||||||
console.open(runAs + "@hsadmin>");
|
console.open(runAs + "@hsadmin> ");
|
||||||
JSONFormatter formatter = new JSONFormatter();
|
JSONFormatter formatter = new JSONFormatter();
|
||||||
ScriptClient scriptClient = new ScriptClient(console, cmdParser.getUser(), runAs);
|
ScriptClient scriptClient = new ScriptClient(console, cmdParser.getUser(), runAs);
|
||||||
String file = cmdParser.getFile();
|
String file = cmdParser.getFile();
|
||||||
@ -26,7 +26,7 @@ public class Main {
|
|||||||
try {
|
try {
|
||||||
console.println(formatter.format(scriptClient.execute(new FileReader(fileHandle))));
|
console.println(formatter.format(scriptClient.execute(new FileReader(fileHandle))));
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
System.err.println("file not found: " + file);
|
System.err.println("File not found: " + file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -40,7 +40,7 @@ public class Main {
|
|||||||
try {
|
try {
|
||||||
console.println(formatter.format(scriptClient.execute(command)));
|
console.println(formatter.format(scriptClient.execute(command)));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
console.println("ERR: " + e.getLocalizedMessage() + "\n");
|
console.println("Error: " + e.getLocalizedMessage() + "\n");
|
||||||
}
|
}
|
||||||
command = console.readInput();
|
command = console.readInput();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user