Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
spack
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EBRAINS RI
Tech Hub
Platform
EBRAINS Software Distribution
spack
Commits
18871ffd
Commit
18871ffd
authored
11 months ago
by
Eric Müller
Committed by
Eleni Mathioulaki
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(cmd spec -y): add yaml doc separators (---)
parent
ca07461b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/spack/spack/cmd/spec.py
+5
-0
5 additions, 0 deletions
lib/spack/spack/cmd/spec.py
with
5 additions
and
0 deletions
lib/spack/spack/cmd/spec.py
+
5
−
0
View file @
18871ffd
...
@@ -100,9 +100,14 @@ def spec(parser, args):
...
@@ -100,9 +100,14 @@ def spec(parser, args):
# With --yaml, --json, or --format, just print the raw specs to output
# With --yaml, --json, or --format, just print the raw specs to output
if
args
.
format
:
if
args
.
format
:
first_doc
=
True
for
spec
in
concrete_specs
:
for
spec
in
concrete_specs
:
if
args
.
format
==
"
yaml
"
:
if
args
.
format
==
"
yaml
"
:
# use write because to_yaml already has a newline.
# use write because to_yaml already has a newline.
if
first_doc
:
first_doc
=
False
else
:
sys
.
stdout
.
write
(
"
---
\n
"
)
sys
.
stdout
.
write
(
spec
.
to_yaml
(
hash
=
ht
.
dag_hash
))
sys
.
stdout
.
write
(
spec
.
to_yaml
(
hash
=
ht
.
dag_hash
))
elif
args
.
format
==
"
json
"
:
elif
args
.
format
==
"
json
"
:
print
(
spec
.
to_json
(
hash
=
ht
.
dag_hash
))
print
(
spec
.
to_json
(
hash
=
ht
.
dag_hash
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment