diff options
-rw-r--r-- | lib/spack/spack/cmd/buildcache.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index 1fda884e9a..08e1af311e 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -754,11 +754,12 @@ def save_specfiles(args): if args.root_specfile: with open(args.root_specfile) as fd: root_spec_as_json = fd.read() + spec_format = 'yaml' if args.root_specfile.endswith('yaml') else 'json' else: root_spec = Spec(args.root_spec) root_spec.concretize() root_spec_as_json = root_spec.to_json(hash=ht.build_hash) - spec_format = 'yaml' if args.root_specfile.endswith('yaml') else 'json' + spec_format = 'json' save_dependency_specfiles( root_spec_as_json, args.specfile_dir, args.specs.split(), spec_format) |