diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/find.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/cmd/uninstall.py | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 27949ef5db..542114c8c1 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -115,7 +115,7 @@ def find(parser, args): q_args = query_arguments(args) query_specs = args.specs(**q_args) # Exit early if no package matches the constraint - if not query_specs: + if not query_specs and args.constraint: msg = "No package matches the query: {0}".format(args.contraint) tty.msg(msg) return diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index f48b28ff73..2f7e15ba55 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -101,7 +101,7 @@ def concretize_specs(specs, allow_multiple_matches=False, force=False): has_errors = True # No installed package matches the query - if len(matching) == 0: + if len(matching) == 0 and spec is not any: tty.error("%s does not match any installed packages." % spec) has_errors = True @@ -196,6 +196,10 @@ def uninstall(parser, args): uninstall_list = get_uninstall_list(args) + if not uninstall_list: + tty.msg("There are no package to uninstall.") + return + if not args.yes_to_all: tty.msg("The following packages will be uninstalled : ") print('') |