Skip to content

Commit 090fb07

Browse files
author
John Doe
committed
fix(entrypoint.sh): Properly fail on error
1 parent e9ca55b commit 090fb07

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

entrypoint.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
#!/bin/bash
2-
# Function to handle errors
3-
error_handler() {
4-
echo "An error occurred. Exiting..."
5-
exit 1
6-
}
7-
8-
# Trap errors and call the error_handler function
9-
trap 'error_handler' ERR
2+
3+
# Fail on error
4+
set -eu -o pipefail
5+
6+
# Debug
7+
echo "Running git subtree ${INPUT_ACTION} on ${INPUT_REPO} at ${INPUT_POSITION} with prefix ${INPUT_PREFIX}"
108

119
# Args
1210
SQUASH=""

0 commit comments

Comments
 (0)