-
Notifications
You must be signed in to change notification settings - Fork 714
Make ‘cabal exec’ not pass -package-env to called executable #10990
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
Conversation
It never did previously and it’s a bug that it started to.
2a45726
to
d2d50cd
Compare
Sounds good to me but it'd be great to have the author of #10828 weigh in, @mpickering |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks for the precise fix.
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks: You can check the last failing draft PR here: #11009. You may have to fix your CI before adding the pull request to the queue again. |
This pull request has been removed from the queue for the following reason: The pull request can't be updated. You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. |
Summary
The
cabal exec
always passed only the options user explicitly specified but after #10828 started passing-package-env
as well.This is a followup to #10828 that fixes
cabal exec
that passes-package-env
flag to all executables if underlying ghc supports env files. This breaks said executables.Longer version
cabal exec
started passing-package-env=-
to all executables ifunderlying GHC supports env files. This makes the called executable
fail if it doesn’t support the
-package-env
flag, which manyexecutables don’t.
This change restores old
cabal exec
behaviour to call regularexecutables without any extra command-line options and keeps fixes in
PR 10828 that passes
-package-env
when dealing with GHC in othercabal commands. GHC is not typically called via
cabal exec
but thePR 10828 made other commands like
cabal build
pass the flag. This PRattempts to maintain that.
Please read Github PR Conventions and then fill in one of these two templates.
Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
significance: significant
in the changelog file.