Open
Description
As discussed in #1088, cabal run
currently requires separating the executable's options from run
flags with --
:
$ cabal run foo -- -bar baz
./dist/build/foo/foo -bar baz
$ cabal run foo -bar baz
Unrecognized option: -bar
It would be nice to make the --
optional while still allowing passing options (e.g. --env-var
) to run
itself. One way to implement this is to treat all input after and including the first unrecognised option as executable's options. However, making this work seems to require modifying both Distribution.Simple.Command
and Distribution.GetOpt
.