3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-05-04 06:15:47 +00:00

Merge pull request #4619 from malmeloo/fix/tee-path-whitespace

Allow whitespace in `tee` command paths
This commit is contained in:
KrystalDelusion 2025-05-01 09:33:47 +12:00 committed by GitHub
commit 22c72a5af4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,7 +72,9 @@ struct TeePass : public Pass {
} }
if ((args[argidx] == "-o" || args[argidx] == "-a") && argidx+1 < args.size()) { if ((args[argidx] == "-o" || args[argidx] == "-a") && argidx+1 < args.size()) {
const char *open_mode = args[argidx] == "-o" ? "w" : "a+"; const char *open_mode = args[argidx] == "-o" ? "w" : "a+";
FILE *f = fopen(args[++argidx].c_str(), open_mode); auto path = args[++argidx];
rewrite_filename(path);
FILE *f = fopen(path.c_str(), open_mode);
yosys_input_files.insert(args[argidx]); yosys_input_files.insert(args[argidx]);
if (f == NULL) { if (f == NULL) {
for (auto cf : files_to_close) for (auto cf : files_to_close)