Skip to content

Commit ea6e0da

Browse files
committed
server: Adding a usage string in front of help message
1 parent fcdfa01 commit ea6e0da

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

java/server/src/org/openqa/grid/common/GridDocHelper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static void printHubHelp(String msg) {
3535
}
3636

3737
public static void printHubHelp(String msg, boolean error) {
38-
printHelpInConsole(msg, hubProperties, error);
38+
printHelpInConsole(msg, "hub", hubProperties, error);
3939
RemoteControlLauncher.printWrappedLine(
4040
"",
4141
"This synopsis lists options available in hub role only. To get help on the command line options available for other roles run the server with -help option and the corresponding -role option value.");
@@ -46,7 +46,7 @@ public static void printNodeHelp(String msg) {
4646
}
4747

4848
public static void printNodeHelp(String msg, boolean error) {
49-
printHelpInConsole(msg, nodeProperties, error);
49+
printHelpInConsole(msg, "node", nodeProperties, error);
5050
RemoteControlLauncher.printWrappedLine(
5151
"",
5252
"This synopsis lists options available in node role only. To get help on the command line options available for other roles run the server with -help option and the corresponding -role option value.");
@@ -72,7 +72,7 @@ public static String getNodeParam(String param) {
7272
return getParam(nodeProperties, param);
7373
}
7474

75-
private static void printHelpInConsole(String msg, Properties properties, boolean error) {
75+
private static void printHelpInConsole(String msg, String role, Properties properties, boolean error) {
7676
String indent = " ";
7777
String indent2x = indent + indent;
7878
if (msg != null) {
@@ -83,7 +83,7 @@ private static void printHelpInConsole(String msg, Properties properties, boolea
8383
}
8484
}
8585

86-
System.out.println("Usage :");
86+
System.out.println("Usage: java -jar selenium-server.jar -role " + role + " [options]\n");
8787
for (Object key : properties.keySet()) {
8888
System.out.println(indent + "-" + key + ":");
8989
RemoteControlLauncher.printWrappedLine(System.out, indent2x, getParam(properties, key.toString()), true);

0 commit comments

Comments
 (0)