summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2023-11-06 07:53:26 +0100
committerGitHub <noreply@github.com>2023-11-05 22:53:26 -0800
commit3c641c85097cef24cbea238f2254ced90f57bd2c (patch)
tree44849b19551b4d1ff6cd6a8f0a0f9627c706e2ec /var
parent141c7de5d89f32b203438e1d6fca1efd817299f7 (diff)
downloadspack-3c641c85097cef24cbea238f2254ced90f57bd2c.tar.gz
spack-3c641c85097cef24cbea238f2254ced90f57bd2c.tar.bz2
spack-3c641c85097cef24cbea238f2254ced90f57bd2c.tar.xz
spack-3c641c85097cef24cbea238f2254ced90f57bd2c.zip
spack env activate: create & activate default environment without args (#40756)
This PR implements the concept of "default environment", which doesn't have to be created explicitly. The aim is to lower the barrier for adopting environments. To (create and) activate the default environment, run ``` $ spack env activate ``` This mimics the behavior of ``` $ cd ``` which brings you to your home directory. This is not a breaking change, since `spack env activate` without arguments currently errors. It is similar to the already existing `spack env activate --temp` command which always creates an env in a temporary directory, the difference is that the default environment is a managed / named environment named `default`. The name `default` is not a reserved name, it's just that `spack env activate` creates it for you if you don't have it already. With this change, you can get started with environments faster: ``` $ spack env activate [--prompt] $ spack install --add x y z ``` instead of ``` $ spack env create default ==> Created environment 'default in /Users/harmenstoppels/spack/var/spack/environments/default ==> You can activate this environment with: ==> spack env activate default $ spack env activate [--prompt] default $ spack install --add x y z ``` Notice that Spack supports switching (but not stacking) environments, so the parallel with `cd` is pretty clear: ``` $ spack env activate named_env $ spack env status ==> In environment named_env $ spack env activate $ spack env status ==> In environment default ```
Diffstat (limited to 'var')
0 files changed, 0 insertions, 0 deletions