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
error()
$?
some command RESULT=$? if [ $RESULT != 0 ]; then echo "Aborting on $RESULT, command failed:" exit $RESULT fi
exec('some command'); env.RESULT = (error()=='null' ? 0 : 1); if (env.RESULT !== 0) { echo('Aborting on ' + env.RESULT + ', command failed:'); exit(env.RESULT); }
exec('some command'); env.RESULT = error(); if (env.RESULT !== 0) { echo('Aborting on ' + env.RESULT + ', command failed:'); exit(env.RESULT); }
The text was updated successfully, but these errors were encountered:
This will be supported in shell.errorCode(). That will be in the next shelljs release when I get around to it.
shell.errorCode()
Sorry, something went wrong.
I'll keep this open in case someone wants to update the transpiler to use the new API when it's available.
Thanks for the feedback!
No branches or pull requests
Input (bash) code
Expected output ShellJS (JavaScript) code
Actual output ShellJS (JavaScript) code
The text was updated successfully, but these errors were encountered: