diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2021-08-09 16:07:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-09 07:07:39 -0700 |
commit | 81be31aee091a6d108a40e0f3dc7ff3bdfa93f26 (patch) | |
tree | a90222c3170c90809f4f3df10e7b0e501632de0d | |
parent | fc46db226971e76698750826f1e0da00cbd8f84c (diff) | |
download | spack-81be31aee091a6d108a40e0f3dc7ff3bdfa93f26.tar.gz spack-81be31aee091a6d108a40e0f3dc7ff3bdfa93f26.tar.bz2 spack-81be31aee091a6d108a40e0f3dc7ff3bdfa93f26.tar.xz spack-81be31aee091a6d108a40e0f3dc7ff3bdfa93f26.zip |
Make spack env activate x idempotent (#25222)
* Make spack env activate x idempotent
* Update lib/spack/spack/cmd/env.py
-rw-r--r-- | lib/spack/spack/cmd/env.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index 64b9a2411d..fe40da4412 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -103,7 +103,8 @@ def env_activate(args): tty.die("No such environment: '%s'" % env) if spack_env == os.environ.get('SPACK_ENV'): - tty.die("Environment %s is already active" % args.activate_env) + tty.debug("Environment %s is already active" % args.activate_env) + return active_env = ev.get_env(namedtuple('args', ['env'])(env), 'activate') |