Expand relative dev paths in environment files (#22045)

* Rewrite relative dev_spec paths internally to absolute paths in case of relocation of the environment file

* Test relative paths for dev_path in environments

* Add a --keep-relative flag to spack env create

This ensures that relative paths of develop paths are not expanded to
absolute paths when initializing the environment in a different location
from the spack.yaml init file.
This commit is contained in:
Harmen Stoppels
2021-03-15 21:38:35 +01:00
committed by GitHub
parent 4f1d9d6095
commit 195341113e
7 changed files with 139 additions and 20 deletions

View File

@@ -793,7 +793,7 @@ _spack_env_deactivate() {
_spack_env_create() {
if $list_options
then
SPACK_COMPREPLY="-h --help -d --dir --without-view --with-view"
SPACK_COMPREPLY="-h --help -d --dir --keep-relative --without-view --with-view"
else
_environments
fi