Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
5cb6ea3b
Commit
5cb6ea3b
authored
Jul 30, 2008
by
Duncan Coutts
Browse files
Make the upgrade command take all the install command flags
parent
65c37dbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/Setup.hs
View file @
5cb6ea3b
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment