-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow omitting the double dash when running cabal run
#1119
Comments
Assigning this to myself so that I don't forget about the issue. |
Why not require that flags to |
I think this is already a distinction cabal-install does with global vs command-specific flags, e.g. |
This requires reworking the way we parse options. E.g. there is no direct support for subcommands (#1257), which is why all |
What @23Skidoo said. It's a limitation in how getopt works. |
I have a simple question: Why? IMO "it would be nice" is extremely weak justification and there's no actual use case presented. Given the complexity/invasiveness of implementation I think this should just be closed. Also, requiring "--" is pretty standard for pretty much everything which takes "a subprogram to run" as an argument. |
As discussed in #1088,
cabal run
currently requires separating the executable's options fromrun
flags with--
:It would be nice to make the
--
optional while still allowing passing options (e.g.--env-var
) torun
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 bothDistribution.Simple.Command
andDistribution.GetOpt
.The text was updated successfully, but these errors were encountered: