Skip to content

Commit

Permalink
sim_if/nvc.py: quote words with spaces in printed command (#940)
Browse files Browse the repository at this point in the history
This allows the command to be directly copied and pasted without having
to quote e.g. the JSON in the `-g` argument.
  • Loading branch information
nickg authored Jul 13, 2023
1 parent 58dcffd commit d14478f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/news.d/940.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[NVC] Multi-word command line arguments are now quoted in the log.
2 changes: 1 addition & 1 deletion vunit/sim_if/nvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def simulate(self, output_path, test_suite_name, config, elaborate_only):
if wave_file:
cmd += [f"--wave={wave_file}"]

print(" ".join(cmd))
print(" ".join([f"'{word}'" if " " in word else word for word in cmd]))

status = True

Expand Down

0 comments on commit d14478f

Please sign in to comment.