fix(Cabal, cabal-install): List global flags in the help text of every command - #12299
Open
zlonast wants to merge 4 commits into
Open
fix(Cabal, cabal-install): List global flags in the help text of every command#12299zlonast wants to merge 4 commits into
zlonast wants to merge 4 commits into
Conversation
andreabedini
approved these changes
Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: #7587
Global options of
cabal, such as--store-dir, were only documented in thehelp of the
cabalprogram itself (cabal --help) but not in the help text ofthe individual commands that they affect, e.g.
cabal build --help. This madeoptions like
--store-dirhard to discover.Now every command's help text ends with a
Global flags:section listing thesame global options as the top-level help, together with a note that these
options must be given /before/ the command, e.g.
cabal --store-dir=DIR build.Additionally,
cabal help COMMANDnow shows exactly the same text ascabal COMMAND --help, including the new global flags section and no longerthe "You can edit the cabal configuration file..." epilogue of the global help.
Examples: cabal build Build the package in the current directory or all packages in the project cabal build pkgname Build the package named pkgname in the project cabal build ./pkgfoo Build the package in the ./pkgfoo directory cabal build cname Build the component named cname in the project cabal build cname --enable-profiling Build the component in profiling mode (including dependencies as needed) + +Global flags: + -V, --version # Print version information + --full-version # Print full version information with git + revision (if available) and compiler + --numeric-version # Print just the version number + --config-file=FILE # Set an alternate location for the config file + --ignore-expiry # Ignore expiry dates on signed metadata (use + only in exceptional circumstances) + --http-transport=HttpTransport + # Set a transport for http(s) requests. Accepts + 'curl', 'wget', 'powershell', and + 'plain-http'. (default: 'curl') + --store-dir=DIR # The location of the build store + --active-repositories=REPOS # The active package repositories (set to + ':none' to disable all repositories) + +Global flags must be given before the command, e.g. +`cabal --store-dir=DIR build`.Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
significance: significantin the changelog file.