With -o $destination the command works as expected
Without --time the command works as expected
With --time the program crashes AFTER the printing the single header
I tried also to give as input a single empty header file removing --passthru-unfound-includes thinking it could be related to the unresolved includes, but it throws the same error
It's an option I could have misunderstood what --time does. If it simply benchmarks the time needed to write the file on the disk after it has been processed, this issue becomes irrelevant. In this case it could be useful to have a readable error of it for the user
Stacktrace:
Traceback (most recent call last):
File "/usr/local/bin/pcpp", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/pcpp/pcmd.py", line 210, in main
p = CmdPreprocessor(sys.argv)
File "/usr/local/lib/python3.7/site-packages/pcpp/pcmd.py", line 120, in __init__
print("\nTime report:")
ValueError: I/O operation on closed file.
Python version: 3.7.4 pcpp version: 1.21
Description
When I try to print the time taken to to include each header without specifying an output file, it fails.
Command
Useful notes
-o $destination
the command works as expected--time
the command works as expected--time
the program crashes AFTER the printing the single header--passthru-unfound-includes
thinking it could be related to the unresolved includes, but it throws the same error--time
does. If it simply benchmarks the time needed to write the file on the disk after it has been processed, this issue becomes irrelevant. In this case it could be useful to have a readable error of it for the userStacktrace: