mirror of
https://github.com/coder/coder.git
synced 2025-07-18 14:17:22 +00:00
fix: Force trap to always succeed due to incompatibility (#2953)
There are some instances of Linux that don't support trap. We should ignore the failure in those cases.
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eux pipefail
|
||||
trap 'echo === Agent script exited with non-zero code. Sleeping 24h to preserve logs... && sleep 86400' EXIT
|
||||
# Not all instances of "trap" support ERR SIGNAL_SPEC. See: https://github.com/bmizerany/roundup/issues/25
|
||||
trap 'echo === Agent script exited with non-zero code. Sleeping 24h to preserve logs... && sleep 86400' EXIT || true
|
||||
BINARY_DIR=$(mktemp -d -t coder.XXXXXX)
|
||||
BINARY_NAME=coder
|
||||
BINARY_URL=${ACCESS_URL}bin/coder-linux-${ARCH}
|
||||
|
Reference in New Issue
Block a user