diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py index d48301f5de..130abea4cc 100644 --- a/lib/spack/spack/cmd/__init__.py +++ b/lib/spack/spack/cmd/__init__.py @@ -435,7 +435,7 @@ def format_list(specs): out = '' if groups: for specs in iter_groups(specs, indent, all_headers): - out += format_list(specs) + output.write(format_list(specs)) else: out = format_list(sorted(specs))