If I give a bad option or combination of options to stack it just prints the usage, without telling me what the problem is. It should tell me what it doesn't like about my options.
For example, I'm trying to figure out the stack test equivalent of cabal test --test-option=<op1> --test-option=<op2>. Looking at stack test --help I see the --test-arguments option. First I try
stack test --test-argument=<op1> --test-argument=<op2>
and stack prints a generic Usage: ... message without any hint about what is wrong.
The problem is that the option is called --test-arguments (plural), not --test-argument (singular); Stack should tell me what the problem is: the option I gave is unknown (bonus points for suggesting the correct option like GHC does with typoed symbols, but that's a fancier fix).
I then wonder if I'm only allowed to use the --test-argument option once and try
stack test --test-argument=<op1>
and stack says Usage: .... Again, I have no idea what I've done wrong.
I then realize I was supposed to write --test-arguments, plural, so I try
stack test --test-arguments=<op1>
which works. So, I try two arguments again with
stack test --test-arguments=<op1> --test-arguments=<op2>
and stack says Usage: .... The problem now is that I'm not allowed to specify --test-arguments twice; Stack should tell me this.
Finally, I try the correct
stack test --test-arguments='<op1> <op2>'
and the test runs :)
If I give a bad option or combination of options to
stackit just prints the usage, without telling me what the problem is. It should tell me what it doesn't like about my options.For example, I'm trying to figure out the
stack testequivalent ofcabal test --test-option=<op1> --test-option=<op2>. Looking atstack test --helpI see the--test-argumentsoption. First I tryand stack prints a generic
Usage: ...message without any hint about what is wrong.The problem is that the option is called
--test-arguments(plural), not--test-argument(singular); Stack should tell me what the problem is: the option I gave is unknown (bonus points for suggesting the correct option like GHC does with typoed symbols, but that's a fancier fix).I then wonder if I'm only allowed to use the
--test-argumentoption once and tryand stack says
Usage: .... Again, I have no idea what I've done wrong.I then realize I was supposed to write
--test-arguments, plural, so I trywhich works. So, I try two arguments again with
and stack says
Usage: .... The problem now is that I'm not allowed to specify--test-argumentstwice; Stack should tell me this.Finally, I try the correct
and the test runs :)