diff options
author | George Hartzell <hartzell@alerce.com> | 2018-04-17 05:44:08 -0700 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2018-04-17 07:44:08 -0500 |
commit | 669b85e6bcd6c8531265993a12413729c1c2108e (patch) | |
tree | 1e072ef5e950f3a143bc8fbd82e52a1c6e18e664 | |
parent | 07ebcb7f6be809be0a68cf78a96200c500007e3f (diff) | |
download | spack-669b85e6bcd6c8531265993a12413729c1c2108e.tar.gz spack-669b85e6bcd6c8531265993a12413729c1c2108e.tar.bz2 spack-669b85e6bcd6c8531265993a12413729c1c2108e.tar.xz spack-669b85e6bcd6c8531265993a12413729c1c2108e.zip |
Activation of activated package just msg's (#7752)
Activating a package that is already activated now sends a `tty.msg`
and returns.
```
-bash-4.2$ ~/spack/bin/spack activate aspell6-en
==> Package aspell6-en/lc4v24f is already activated.
```
-rw-r--r-- | lib/spack/spack/cmd/activate.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/activate.py b/lib/spack/spack/cmd/activate.py index 52dc497f81..b7b953d153 100644 --- a/lib/spack/spack/cmd/activate.py +++ b/lib/spack/spack/cmd/activate.py @@ -59,7 +59,8 @@ def activate(parser, args): layout = YamlViewExtensionsLayout(args.view, spack.store.layout) if spec.package.is_activated(extensions_layout=layout): - tty.die("Package %s is already activated." % specs[0].short_spec) + tty.msg("Package %s is already activated." % specs[0].short_spec) + return spec.package.do_activate(extensions_layout=layout, with_dependencies=not args.force) |