YosysHQ / yosys

Yosys Open SYnthesis Suite
https://yosyshq.net/yosys/
ISC License
3.5k stars 895 forks source link

`tee -q -o <bad-path>` fails silently #4636

Open povik opened 1 month ago

povik commented 1 month ago

Version

Yosys 0.45+153 (git sha1 1f517d6c7, clang++ 11.1.0 -fPIC -O3)

On which OS did this happen?

macOS

Reproduction Steps

yosys -p "tee -q -o foo/bar.log log (1); log (2)" 

where foo/ doesn't exist

Expected Behavior

An error message is printed hinting of the fact foo/bar.log couldn't be opened for writing

Actual Behavior

The error message from within tee is silenced because of the effect of the -q option, the Yosys process exits with a non-zero exit code but no hint as to why is given; log (2) doesn't execute

Also while opening a tee related issue let me point out the command's code touches yosys_input_files which I think should've been yosys_output_files