Skip to content
Snippets Groups Projects
Commit 2b719a52 authored by ben0x539's avatar ben0x539
Browse files

Make `cabal init` reject extra arguments.

This is better than ignoring them because one is likely in some state of
confusion when passing extraneous arguments to `cabal init` and would
probably appreciate being taken out of that state sooner rather than
later.
parent e99ed843
No related branches found
No related tags found
No related merge requests found
......@@ -1132,7 +1132,9 @@ unpackAction getFlags extraArgs globalFlags = do
getAction getFlags extraArgs globalFlags
initAction :: InitFlags -> [String] -> Action
initAction initFlags _extraArgs globalFlags = do
initAction initFlags extraArgs globalFlags = do
when (extraArgs /= []) $
die $ "'init' doesn't take any extra arguments: " ++ unwords extraArgs
let verbosity = fromFlag (initVerbosity initFlags)
(_useSandbox, config) <- loadConfigOrSandboxConfig verbosity
(globalFlags { globalRequireSandbox = Flag False })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment