We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line 234 in util.sh is testing the exit code of the previous command but suffers from SC2155
Since local is being used for the variable assignment that line will always exit with 0.
local
Testing:
test-func () { local var=$(this-is-not-a-real-command); echo $? ;}
$ test-func -bash: this-is-not-a-real-command: command not found 0
Due to this I believe it should be modified to:
local manta_url manta_url=$(json -f "${METADATA}" MANTA_URL) [[ $? -eq 0 ]] || fatal "Unable to retrieve MANTA_URL from metadata"
Note: This issue is also found on line 217
The text was updated successfully, but these errors were encountered:
Additionally you can test on the command/assignment itself:
local manta_url if ! manta_url=$(json -f "${METADATA}" MANTA_URL); then fatal "Unable to retrieve MANTA_URL from metadata" fi
Sorry, something went wrong.
No branches or pull requests
Line 234 in util.sh is testing the exit code of the previous command but suffers from SC2155
Since
local
is being used for the variable assignment that line will always exit with 0.Testing:
Due to this I believe it should be modified to:
Note: This issue is also found on line 217
The text was updated successfully, but these errors were encountered: