summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStephen McDowell <svenevs@users.noreply.github.com>2019-03-21 03:08:29 -0700
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2019-03-21 11:08:29 +0100
commit70e436e932d001af2d7e56514d35982434a5c239 (patch)
tree6edf8ef4812944aeb175550d360d33f7bd7a3f1a /lib
parentbffe3a605f6f347df723f52afe801fcbf4641890 (diff)
downloadspack-70e436e932d001af2d7e56514d35982434a5c239.tar.gz
spack-70e436e932d001af2d7e56514d35982434a5c239.tar.bz2
spack-70e436e932d001af2d7e56514d35982434a5c239.tar.xz
spack-70e436e932d001af2d7e56514d35982434a5c239.zip
prevent UnboundLocalError when sourcing files (#10950)
Patch extracted from #7536 courtesy of @mgsternberg
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/util/environment.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py
index c7ea4d67f4..1666f4711e 100644
--- a/lib/spack/spack/util/environment.py
+++ b/lib/spack/spack/util/environment.py
@@ -542,6 +542,7 @@ class EnvironmentModifications(object):
search = sep.join(after_list[start:end + 1])
except IndexError:
env.prepend_path(x, after)
+ continue
if search not in before:
# We just need to set the variable to the new value