Permalink
Browse files

Show usage when invoked without arguments.

  • Loading branch information...
1 parent 4b19855 commit c0fb28f0d268ad5fa7051b8cffd95fb0adb94e09 @reid reid committed Apr 15, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/com/yahoo/platform/yui/compressor/YUICompressor.java
@@ -81,6 +81,10 @@ public static void main(String args[]) {
String[] fileArgs = parser.getRemainingArgs();
java.util.List files = java.util.Arrays.asList(fileArgs);
if (files.isEmpty()) {
+ if (type == null) {
+ usage();
+ System.exit(1);
+ }
files = new java.util.ArrayList();
files.add("-"); // read from stdin
}

0 comments on commit c0fb28f

Please sign in to comment.