diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2021-10-28 20:39:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-28 11:39:25 -0700 |
commit | 6d030ba1372f7fc1de3f3d8d87a47f203ef036f8 (patch) | |
tree | 26ae4483acb57bd1cd04ad08ec4471445e27b875 /NOTICE | |
parent | 87e456d59cf43700c8ed257d957794d2c083082a (diff) | |
download | spack-6d030ba1372f7fc1de3f3d8d87a47f203ef036f8.tar.gz spack-6d030ba1372f7fc1de3f3d8d87a47f203ef036f8.tar.bz2 spack-6d030ba1372f7fc1de3f3d8d87a47f203ef036f8.tar.xz spack-6d030ba1372f7fc1de3f3d8d87a47f203ef036f8.zip |
Deactivate previous env before activating new one (#25409)
* Deactivate previous env before activating new one
Currently on develop you can run `spack env activate` multiple times to switch
between environments, but they leave traces, even though Spack only supports
one active environment at a time.
Currently:
```console
$ spack env create a
$ spack env create b
$ spack env activate -p a
[a] $ spack env activate -p b
[b] [a] $ spack env activate -p b
[a] [b] [a] $ spack env activate -p a
[a] [b] [c] $ echo $MANPATH | tr ":" "\n"
/path/to/environments/a/.spack-env/view/share/man
/path/to/environments/a/.spack-env/view/man
/path/to/environments/b/.spack-env/view/share/man
/path/to/environments/b/.spack-env/view/man
```
This PR fixes that:
```console
$ spack env activate -p a
[a] $ spack env activate -p b
[b] $ spack env activate -p a
[a] $ echo $MANPATH | tr ":" "\n"
/path/to/environments/a/.spack-env/view/share/man
/path/to/environments/a/.spack-env/view/man
```
Diffstat (limited to 'NOTICE')
0 files changed, 0 insertions, 0 deletions