# HG changeset patch # User Adam Chlipala # Date 1345312301 14400 # Node ID 90ebfac7e1a3bd0a82d5069b224dc4c9b9fab143 # Parent 15eb501a17d0e714987f465bdcb0408ebee875bf Better error message for funky command lines diff -r 15eb501a17d0 -r 90ebfac7e1a3 src/main.mlton.sml --- a/src/main.mlton.sml Tue Aug 07 10:02:19 2012 -0400 +++ b/src/main.mlton.sml Sat Aug 18 13:51:41 2012 -0400 @@ -169,7 +169,11 @@ 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, _, _) =>