Skip to content

Commit

Permalink
Escape dir name when splitting files
Browse files Browse the repository at this point in the history
This fixes an issue, where if the directory where split files should go
already exists and contains verilog files, then those are picked up in
bash glob, rather than passing the string "<dir>/*.v" directly. Now,
when issuing the CoreIR command we escape this string.
  • Loading branch information
rsetaluri committed Sep 6, 2018
1 parent 667440b commit 74b5f9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion magma/compile.py
Expand Up @@ -77,7 +77,7 @@ def __compile_to_coreir(main, file_name, opts):
cmd = f"coreir {lib_arg} -i {file_name}.json"
if opts.get("split", ""):
split = opts["split"]
cmd += f" -o {split}/*.v -s"
cmd += f" -o \"{split}/*.v\" -s"
else:
cmd += f" -o {file_name}.v"
subprocess.run(cmd, shell=True)
Expand Down

0 comments on commit 74b5f9d

Please sign in to comment.