diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2022-02-15 16:21:19 +0100 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2022-04-14 11:08:17 +0200 |
commit | 5b0d4fe928a6cab7257b8949a0be4b61d6d1951a (patch) | |
tree | 9efe5b45cadbcb6451655217919341c66b02d5b1 | |
parent | deb9102b2dd671871b1362b1d20a719fef077f0d (diff) | |
download | spack-5b0d4fe928a6cab7257b8949a0be4b61d6d1951a.tar.gz spack-5b0d4fe928a6cab7257b8949a0be4b61d6d1951a.tar.bz2 spack-5b0d4fe928a6cab7257b8949a0be4b61d6d1951a.tar.xz spack-5b0d4fe928a6cab7257b8949a0be4b61d6d1951a.zip |
Unalias despacktivate only when alias exists (#28939)
-rw-r--r-- | lib/spack/spack/environment/shell.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/environment/shell.py b/lib/spack/spack/environment/shell.py index abc537cdf2..33825c00d3 100644 --- a/lib/spack/spack/environment/shell.py +++ b/lib/spack/spack/environment/shell.py @@ -73,7 +73,7 @@ def deactivate_header(shell): cmds += 'if [ ! -z ${SPACK_ENV+x} ]; then\n' cmds += 'unset SPACK_ENV; export SPACK_ENV;\n' cmds += 'fi;\n' - cmds += 'unalias despacktivate;\n' + cmds += 'alias despacktivate > /dev/null 2>&1 && unalias despacktivate;\n' cmds += 'if [ ! -z ${SPACK_OLD_PS1+x} ]; then\n' cmds += ' if [ "$SPACK_OLD_PS1" = \'$$$$\' ]; then\n' cmds += ' unset PS1; export PS1;\n' |