Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dde51f1

Browse files
authored
fix: Force trap to always succeed due to incompatibility (coder#2953)
There are some instances of Linux that don't support trap. We should ignore the failure in those cases.
1 parent 5ee112b commit dde51f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

provisionersdk/scripts/bootstrap_linux.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env sh
22
set -eux pipefail
3-
trap 'echo === Agent script exited with non-zero code. Sleeping 24h to preserve logs... && sleep 86400' EXIT
3+
# Not all instances of "trap" support ERR SIGNAL_SPEC. See: https://github.com/bmizerany/roundup/issues/25
4+
trap 'echo === Agent script exited with non-zero code. Sleeping 24h to preserve logs... && sleep 86400' EXIT || true
45
BINARY_DIR=$(mktemp -d -t coder.XXXXXX)
56
BINARY_NAME=coder
67
BINARY_URL=${ACCESS_URL}bin/coder-linux-${ARCH}

0 commit comments

Comments
 (0)