Commit 617e9a89 authored by Simon Marlow's avatar Simon Marlow
Browse files

"list --simple-output" should be quiet when there are no packages to list

Previously:

$ ghc-pkg list --user --simple-output
ghc-pkg: no matches
$

Now:

$ ghc-pkg list --user --simple-output
$
parent 9fd454ab
......@@ -506,8 +506,8 @@ listPackages flags mPackageName mModuleName = do
else showPackageId
pkgs = map showPkg $ sortBy compPkgIdVer $
map package (concatMap snd db_stack)
when (null pkgs) $ die "no matches"
hPutStrLn stdout $ concat $ intersperse " " pkgs
when (not (null pkgs)) $
hPutStrLn stdout $ concat $ intersperse " " pkgs
-- -----------------------------------------------------------------------------
-- Prints the highest (hidden or exposed) version of a package
......
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