Commit ba260af9 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Have command line args override saved config not the other way around

Fixes setting the --prefix from the command line which was previously being
ignored in favour of the default prefix from the config file.
parent b507d36c
......@@ -112,8 +112,8 @@ installAction flags extraArgs = do
configFile <- defaultConfigFile --FIXME
let verbosity = fromFlagOrDefault normal (Cabal.configVerbose flags)
config <- loadConfig verbosity configFile
let flags' = flags `mappend`
savedConfigToConfigFlags (Cabal.configPackageDB flags) config
let flags' = savedConfigToConfigFlags (Cabal.configPackageDB flags) config
`mappend` flags
(comp, conf) <- configCompilerAux flags'
install verbosity
(fromFlag $ Cabal.configPackageDB flags') (configRepos config)
......@@ -150,8 +150,8 @@ upgradeAction flags _extraArgs = do
configFile <- defaultConfigFile --FIXME
let verbosity = fromFlagOrDefault normal (Cabal.configVerbose flags)
config <- loadConfig verbosity configFile
let flags' = flags `mappend`
savedConfigToConfigFlags (Cabal.configPackageDB flags) config
let flags' = savedConfigToConfigFlags (Cabal.configPackageDB flags) config
`mappend` flags
(comp, conf) <- configCompilerAux flags'
upgrade verbosity
(fromFlag $ Cabal.configPackageDB flags') (configRepos config)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment