From 8706ac14792c8259857d45a8396e833f56af60e4 Mon Sep 17 00:00:00 2001 From: Gregory Lee Date: Tue, 18 Jun 2019 19:13:12 -0700 Subject: [PATCH] fixed spec dependence attribute writing. Fixes #11686 (#11776) --- lib/spack/spack/spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index cc1613549f9..e8618770363 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -3130,6 +3130,7 @@ def write(s, c=None): 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 @@ def write_attribute(spec, attribute, color): 'Format string attributes must be non-empty') attribute = attribute.lower() - current = spec sig = '' if attribute[0] in '@%/': # color sigils that are inside braces