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
1.4.4
This starlark script reports the output of run_sh scripts that exit 1 to be 0 in result.code.
run_sh
exit 1
0
result.code
def run(plan, args={}): fail = plan.run_sh( name="fail", image="ubuntu:latest", run="exit 1", ) plan.print("Fail output: {0}, Fail code: {1}".format(fail.output, fail.code)) succeed = plan.run_sh( name="succeed", image="ubuntu:latest", run="exit 0", ) plan.print("Success output: {0}, Success code: {1}".format(succeed.output, succeed.code)) plan.add_service( name="service", config=ServiceConfig( image="ubuntu:latest", cmd=["sleep", "10000s"] ) ) exec_result = plan.exec( service_name="service", recipe=ExecRecipe( command=["/bin/sh", "-c", "exit 1"] ), acceptable_codes = [0], description="exec should fail" ) plan.print("Exec output: {0}, Exec code: {1}".format(exec_result["output"], exec_result["code"]))
The value of result.code should accurately reflect that exit code of the shell script ran in run_sh
Painful; this is causing significant friction in my workflow.
Other: anything not covered by the above
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What's your CLI version?
1.4.4
Description & steps to reproduce
This starlark script reports the output of
run_sh
scripts thatexit 1
to be0
inresult.code
.Desired behavior
The value of
result.code
should accurately reflect that exit code of the shell script ran inrun_sh
What is the severity of this bug?
Painful; this is causing significant friction in my workflow.
What area of the product does this pertain to?
Other: anything not covered by the above
The text was updated successfully, but these errors were encountered: