Commit 0014fa56 authored by Niklas Hambüchen's avatar Niklas Hambüchen Committed by Ben Gamari

ghc-pkg: Allow unregistering multiple packages in one call

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2550

GHC Trac Issues: #12637
parent 48ff0843
......@@ -226,8 +226,8 @@ usageHeader prog = substProg prog $
" Register the package, overwriting any other package with the\n" ++
" same name. The input file should be encoded in UTF-8.\n" ++
"\n" ++
" $p unregister {pkg-id}\n" ++
" Unregister the specified package.\n" ++
" $p unregister [pkg-id] \n" ++
" Unregister the specified packages in the order given.\n" ++
"\n" ++
" $p expose {pkg-id}\n" ++
" Expose the specified package.\n" ++
......@@ -422,9 +422,10 @@ runit verbosity cli nonopts = do
registerPackage filename verbosity cli
multi_instance
expand_env_vars True force
["unregister", pkgarg_str] -> do
pkgarg <- readPackageArg as_arg pkgarg_str
unregisterPackage pkgarg verbosity cli force
"unregister" : pkgarg_strs@(_:_) -> do
forM_ pkgarg_strs $ \pkgarg_str -> do
pkgarg <- readPackageArg as_arg pkgarg_str
unregisterPackage pkgarg verbosity cli force
["expose", pkgarg_str] -> do
pkgarg <- readPackageArg as_arg pkgarg_str
exposePackage pkgarg verbosity cli force
......
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