Skip to content

Commit 729b06a

Browse files
authored
Don't fail silently if the pipeline tries to use the cryptic plugin but we aren't privileged (#39)
* Don't fail silently if the pipeline tries to use the cryptic plugin but we aren't privileged * Apply the same change to `hooks/post-command`
1 parent a8daa19 commit 729b06a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

hooks/post-checkout

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ source "${CRYPTIC_REPO}/lib/common.sh"
99
# If we're not authorized, quit out immediately
1010
if [[ "${BUILDKITE_PLUGIN_CRYPTIC_PRIVILEGED:-false}" != "true" ]]; then
1111
echo "Exiting immediately, as we're not privileged"
12-
exit 0
12+
13+
# In this case, we don't want to fail silently.
14+
# So we intentionally exit with non-zero exit code.
15+
exit 1
1316
fi
1417

1518
# Receive keys from agent environment hook

hooks/post-command

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ source "${CRYPTIC_REPO}/lib/common.sh"
99
# If we're not authorized, quit out immediately
1010
if [[ "${BUILDKITE_PLUGIN_CRYPTIC_PRIVILEGED:-false}" != "true" ]]; then
1111
echo "Exiting immediately, as we're not privileged"
12-
exit 0
12+
13+
# In this case, we don't want to fail silently.
14+
# So we intentionally exit with non-zero exit code.
15+
exit 1
1316
fi
1417

1518
# If the command hook failed, quit out immediately

0 commit comments

Comments
 (0)