summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/environment/shell.py2
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'