Closed EnergyFusion closed 5 years ago
Now that it's using the ProcessBuilder.Redirect
You need to remember to split the output otherwise you don't get a clean json file. Something like:
java -jar build/libs/securify-0.1.jar -fs src/test/resources/solidity/transaction-reordering.sol >output.json 2>error.log
As long as you use the usual command > output-file
syntax it will only catch stdout, producing a valid json file. Of course on the shell you will see both, possibly even intertwined, so there to ignore errors you can redirect them to /dev/null like this:
java -jar build/libs/securify-0.1.jar -fs src/test/resources/solidity/transaction-reordering.sol 2>/dev/null
Approved, @hiqua feel free to merge from my side
Proposed solution for #24
Securify reports a generic IOException when solc fails.
This PR addresses that by collecting the solc Process' ErrorStream and piping it out to System.err
A check to see that the first line has 'Error' is so that the Warnings from solc are not printed when there are no errors.