add usage message when too few args

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@36679 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
mindless committed 2010-11-05 19:29:52 +00:00
1 parent 87eeedc4d3
commit 791ec9a98c
1 file changed
+5 -1
+5 -1
View File
@@ -63,10 +63,14 @@ public class Main {
public static int run(String[] args) throws Exception {
String home = getHudsonHome();
if(home==null) {
if (home==null) {
System.err.println("HUDSON_HOME is not set.");
return -1;
}
if (args.length < 2) {
System.err.println("Usage: <job-name> <command> <args..>");
return -1;
}
return remotePost(args);
}