Skip to content

Conversation

@simuons
Copy link
Collaborator

@simuons simuons commented Feb 24, 2022

Actions might look like completed successfully even though one of the commands fail.
This might cause remote-cache poisoning.

Actions might look like completed successfully even though one of the commands fail.
This might cause remote-cache poisoning.
@simuons simuons requested a review from liucijus as a code owner February 24, 2022 16:34
zipper_arg_path = ctx.actions.declare_file("%s_zipper_args" % ctx.label.name)
ctx.actions.write(zipper_arg_path, resources)
cmd = """
set -e

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
set -e
set -o errexit
set -o nounset
set -o pipefail

Generally I prefer long options for scripting. If we're adding -e, might as well add nounset and pipefail as well? I'd be curious if touch always succeeds. It might not be rules_scala, but I sometimes see touch getting rejected. (Likely it already exists)

@eed3si9n
Copy link

s/run_shall/run_shell/

@simuons simuons changed the title set -e for ctx.actions.run_shall commands set -e for ctx.actions.run_shell commands Feb 24, 2022
@liucijus liucijus merged commit 088c087 into master Feb 25, 2022
@liucijus liucijus deleted the set-exit-immediately-for-run-shell-actions branch February 25, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants