Commit d9abfcfe authored by Duncan Coutts's avatar Duncan Coutts

Don't override config with install defaults

parent 74cb2909
......@@ -202,7 +202,7 @@ installWithPlanner planner verbosity packageDB repos comp conf configFlags insta
useLoggingHandle = Nothing,
useWorkingDir = Nothing
}
useDetailedBuildReports = Cabal.fromFlag (installBuildReports installFlags)
useDetailedBuildReports = Cabal.fromFlagOrDefault False (installBuildReports installFlags)
useLogFile :: FilePath -> Maybe (PackageIdentifier -> FilePath)
useLogFile logsDir = fmap substLogFileName logFileTemplate
where
......@@ -214,7 +214,7 @@ installWithPlanner planner verbosity packageDB repos comp conf configFlags insta
. toPathTemplate
$ path
where env = initialPathTemplateEnv (packageId pkg) (compilerId comp)
dryRun = Cabal.fromFlag (installDryRun installFlags)
dryRun = Cabal.fromFlagOrDefault False (installDryRun installFlags)
miscOptions = InstallMisc {
rootCmd = if Cabal.fromFlag (Cabal.configUserInstall configFlags)
then Nothing -- ignore --root-cmd if --user.
......@@ -268,7 +268,7 @@ planRepoPackages :: PackagesVersionPreference -> Compiler -> InstallFlags
planRepoPackages pref comp installFlags deps installed available = do
deps' <- IndexUtils.disambiguateDependencies available deps
let installed'
| Cabal.fromFlag (installReinstall installFlags)
| Cabal.fromFlagOrDefault False (installReinstall installFlags)
= fmap (hideGivenDeps deps') installed
| otherwise = installed
return $ resolveDependenciesWithProgress buildOS buildArch (compilerId comp)
......
......@@ -357,7 +357,7 @@ installCommand = configureCommand {
commandName = "install",
commandSynopsis = "Installs a list of packages.",
commandUsage = usagePackages "install",
commandDefaultFlags = (mempty, defaultInstallFlags),
commandDefaultFlags = (mempty, mempty),
commandOptions = \showOrParseArgs ->
liftOptionsFst (commandOptions configureCommand showOrParseArgs) ++
liftOptionsSnd (installOptions showOrParseArgs)
......
......@@ -166,7 +166,7 @@ configureAction flags extraArgs globalFlags = do
installAction :: (ConfigFlags, InstallFlags) -> [String] -> GlobalFlags -> IO ()
installAction (cflags,iflags) _ _globalFlags
| fromFlag (installOnly iflags)
| fromFlagOrDefault False (installOnly iflags)
= let verbosity = fromFlagOrDefault normal (configVerbosity cflags)
in setupWrapper verbosity defaultSetupScriptOptions Nothing
installCommand mempty []
......
Markdown is supported
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