Commits

Seth Falcon  committed 5942a6c

Print usage when new_webmachine.erl is given a name that looks like a path

When given a single argument that is not a valid project name, the start
script provides a less than helpful error message. With this patch,
usage is printed instead.

  • Participants
  • Parent commits 09406e0

Comments (0)

Files changed (1)

File scripts/new_webmachine.erl

 %% External API
 
 main([Name]) ->
-    main([Name, "."]);
+    case Name of
+        "." ++ _Rest -> usage();
+        "~" ++ _Rest -> usage();
+        "/" ++ _Rest -> usage();
+        _Any         -> main([Name, "."])
+    end;
 main([Name, Dest]) ->
     ensure(),
     DestDir = filename:absname(Dest),