Skip to content

Commit

Permalink
Apply command line flags to install packages (#8637)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickdoc committed Feb 18, 2023
1 parent ecc92a3 commit dbcd251
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cabal-install/src/Distribution/Client/CmdInstall.hs
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,12 @@ installAction flags@NixStyleFlags { extraFlags = clientInstallFlags', .. } targe
configFlags' = disableTestsBenchsByDefault configFlags
verbosity = fromFlagOrDefault normal (configVerbosity configFlags')
ignoreProject = flagIgnoreProject projectFlags
cliConfig = commandLineFlagsToProjectConfig
baseCliConfig = commandLineFlagsToProjectConfig
globalFlags
flags { configFlags = configFlags' }
clientInstallFlags'
-- Ignore the local/remote distinction for the install command: #8637
cliConfig = baseCliConfig { projectConfigAllPackages = projectConfigLocalPackages baseCliConfig }
globalConfigFlag = projectConfigConfigFile (projectConfigShared cliConfig)

-- | Verify that invalid config options were not passed to the install command.
Expand Down
13 changes: 13 additions & 0 deletions changelog.d/issue-8637
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
synopsis: Apply command line flags to install packages
packages: cabal-install
prs: #
issues: #8637

description: {

- Command line flags usually only apply to "local" packages (packages specified
in the cabal.project). This change causes the v2-install command to ignore
that distinction to better match the expected behavior for packages specified
directly in the command.

}

0 comments on commit dbcd251

Please sign in to comment.