summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/spec.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index cc1613549f..e861877036 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -3130,6 +3130,7 @@ class Spec(object):
cwrite(f, stream=out, color=color)
def write_attribute(spec, attribute, color):
+ current = spec
if attribute.startswith('^'):
attribute = attribute[1:]
dep, attribute = attribute.split('.', 1)
@@ -3140,7 +3141,6 @@ class Spec(object):
'Format string attributes must be non-empty')
attribute = attribute.lower()
- current = spec
sig = ''
if attribute[0] in '@%/':
# color sigils that are inside braces