OSDN Git Service

fix a bug: show incorrect error message when calling -f without
[stew/Stew4.git] / src / net / argius / stew / CommandProcessor.java
index 64383cf..5d6d2eb 100644 (file)
@@ -114,6 +114,9 @@ final class CommandProcessor {
         }
         // from file
         if (commandName.equals("-f")) {
+            if (!p.has(1)) {
+                throw new UsageException(res.get("usage.-f"));
+            }
             final File file = Path.resolve(env.getCurrentDirectory(), p.at(1));
             final String abspath = file.getAbsolutePath();
             if (log.isDebugEnabled()) {