near / near-cli

General purpose command line tools for interacting with NEAR Protocol
https://docs.near.org
MIT License
193 stars 93 forks source link

fix: throw exception and then return exit(1) on call with error #963

Closed kalloc closed 2 years ago

kalloc commented 2 years ago

Hi!

I found the missing process.exit(1) after an error during functionCall.

Expected example:

./bin/near call usn unknown_method '{}' --accountId kalloc.testnet > /dev/null;echo $?
        Failure [usn]: Error: Can't complete the action because account usn doesn't exist
…
}
1