Mercurial > urweb
changeset 1808:90ebfac7e1a3
Better error message for funky command lines
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 18 Aug 2012 13:51:41 -0400 |
parents | 15eb501a17d0 |
children | b8fa7441e637 |
files | src/main.mlton.sml |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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, _, _) =>