bzzparse returns 0 when fails to read included file
xgroleau opened this issue · comments
When an included file is not found, bzzparse returns 0. Our compilation pipelines still continues even if the compilation failed and we end up with invalid nop only bytecode.
To reproduce:
The in.bzz
file
include "invalid_file.bzz"
The shell script
bzzparse in.bzz out.basm # Prints "Can't read 'invalid_file.bzz'"
echo $? # Returns 0, should return a non-zero error code
Thank you for finding this issue. There are a couple of places where missed a check for a valid include.