Commit 5cb6ea3b authored by Duncan Coutts's avatar Duncan Coutts

Make the upgrade command take all the install command flags

parent 65c37dbd
......@@ -111,9 +111,7 @@ upgradeCommand = configureCommand {
commandDescription = Nothing,
commandUsage = usagePackages "upgrade",
commandDefaultFlags = (mempty, defaultInstallFlags),
commandOptions = \showOrParseArgs ->
liftOptionsFst (commandOptions configureCommand showOrParseArgs)
++ liftOptionsSnd [optionDryRun]
commandOptions = commandOptions installCommand
}
{-
......@@ -226,7 +224,10 @@ installCommand = configureCommand {
commandOptions = \showOrParseArgs ->
liftOptionsFst (commandOptions configureCommand showOrParseArgs) ++
liftOptionsSnd
([ optionDryRun
([ option [] ["dry-run"]
"Do not install anything, only print what would be installed."
installDryRun (\v flags -> flags { installDryRun = v })
trueArg
, option [] ["root-cmd"]
"Command used to gain root privileges, when installing with --global."
......@@ -250,13 +251,6 @@ installCommand = configureCommand {
_ -> [])
}
optionDryRun :: OptionField InstallFlags
optionDryRun =
option [] ["dry-run"]
"Do not install anything, only print what would be installed."
installDryRun (\v flags -> flags { installDryRun = v })
trueArg
instance Monoid InstallFlags where
mempty = defaultInstallFlags
mappend a b = InstallFlags {
......
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