diff options
author | 2012-08-18 13:51:41 -0400 | |
---|---|---|
committer | 2012-08-18 13:51:41 -0400 | |
commit | 0e265215e3f2c9bde5ffa019c0d97fca931d09d4 (patch) | |
tree | e418c27ae3ed6540685463ce29b46df30c473c03 /src/main.mlton.sml | |
parent | 4cbd2f6f0105fc49423fd9f6301aeb175705408e (diff) |
Better error message for funky command lines
Diffstat (limited to 'src/main.mlton.sml')
-rw-r--r-- | src/main.mlton.sml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.mlton.sml b/src/main.mlton.sml index 6ecb2f92..34dd6382 100644 --- a/src/main.mlton.sml +++ b/src/main.mlton.sml @@ -169,7 +169,11 @@ fun oneRun args = val job = case !sources of [file] => file - | _ => printVersion () + | _ => + if List.exists (fn s => s <> "-version") args then + raise Fail "Zero or multiple input files specified; only one is allowed." + else + printVersion () in case (!css, !demo, !tutorial) of (true, _, _) => |