Tenderly / tenderly-cli

CLI tool for Smart Contract error tracking, monitoring and alerting.
https://tenderly.co
GNU General Public License v3.0
518 stars 134 forks source link

Make `spawn-rpc` "return" url instead of logging/printing it #164

Closed beruda closed 10 months ago

beruda commented 11 months ago

Current implementation just prints the URL instead of returning it, so the current command can't be used in bash scripts.

beruda commented 11 months ago

Running

test=$(tenderly version)

won't print anything, but echo $test after it will.

But running

rpc=$(tenderly devnet spawn-rpc --project testerly --account beruda --access_key $API_KEY --template all-purpose-support-testing)

will print the URL, but it won't be written to the rpc env variable; i.e. echo $rpc won't print the URL.

So I just changed this command to return the value using fmt.Printf just like the version command.