Commit 285f160c authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Use defaultInstallFlags as the defaults

parent 365052b2
......@@ -245,7 +245,7 @@ installWithPlanner planner verbosity packageDBs repos comp conf
useLoggingHandle = Nothing,
useWorkingDir = Nothing
}
reportingLevel = fromFlagOrDefault NoReports (installBuildReports installFlags)
reportingLevel = fromFlag (installBuildReports installFlags)
useLogFile :: FilePath -> Maybe (PackageIdentifier -> FilePath)
useLogFile logsDir = fmap substLogFileName logFileTemplate
where
......@@ -259,7 +259,7 @@ installWithPlanner planner verbosity packageDBs repos comp conf
. substPathTemplate env
$ template
where env = initialPathTemplateEnv (packageId pkg) (compilerId comp)
dryRun = fromFlagOrDefault False (installDryRun installFlags)
dryRun = fromFlag (installDryRun installFlags)
miscOptions = InstallMisc {
rootCmd = if fromFlag (configUserInstall configFlags)
then Nothing -- ignore --root-cmd if --user.
......@@ -401,7 +401,7 @@ planRepoPackages defaultPref comp configFlags configExFlags installFlags
deps' <- IndexUtils.disambiguateDependencies available deps
let installed'
| fromFlagOrDefault False (installReinstall installFlags)
| fromFlag (installReinstall installFlags)
= fmap (hideGivenDeps deps') installed
| otherwise = installed
targets = dependencyTargets deps'
......@@ -670,8 +670,7 @@ installUnpackedPackage verbosity scriptOptions miscOptions
buildDistPref = configDistPref configFlags,
buildVerbosity = toFlag verbosity'
}
shouldHaddock = fromFlagOrDefault False
(installDocumentation installConfigFlags)
shouldHaddock = fromFlag (installDocumentation installConfigFlags)
haddockFlags _ = emptyHaddockFlags {
haddockDistPref = configDistPref configFlags,
haddockVerbosity = toFlag verbosity'
......
......@@ -17,7 +17,8 @@ import Distribution.Client.Setup
( GlobalFlags(..), globalCommand, globalRepos
, ConfigFlags(..)
, ConfigExFlags(..), configureExCommand
, InstallFlags(..), installCommand, upgradeCommand
, InstallFlags(..), defaultInstallFlags
, installCommand, upgradeCommand
, fetchCommand, checkCommand
, updateCommand
, ListFlags(..), listCommand
......@@ -195,7 +196,8 @@ installAction (configFlags, configExFlags, installFlags)
(configUserInstall configFlags)
let configFlags' = savedConfigureFlags config `mappend` configFlags
configExFlags' = savedConfigureExFlags config `mappend` configExFlags
installFlags' = savedInstallFlags config `mappend` installFlags
installFlags' = defaultInstallFlags `mappend`
savedInstallFlags config `mappend` installFlags
globalFlags' = savedGlobalFlags config `mappend` globalFlags
(comp, conf) <- configCompilerAux configFlags'
install verbosity
......
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