We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9f9d11 commit 9b2c73dCopy full SHA for 9b2c73d
1 file changed
containers/agent/isolate.sh
@@ -16,7 +16,8 @@
16
# - chroot provides process-level isolation when running host binaries
17
# - All commands run as non-root user (awfuser) after capability drop
18
19
-set -e
+# Note: We intentionally do NOT use 'set -e' here to allow graceful fallback
20
+# through multiple command resolution strategies without exiting on first failure
21
22
# Get the command to execute (first argument)
23
COMMAND="$1"
@@ -39,8 +40,8 @@ if [ ! -d /host ]; then
39
40
exec "$@"
41
fi
42
-# Check if this is an absolute path
43
-if [[ "$COMMAND" == /* ]]; then
+# Check if this is an absolute path (POSIX-compliant test)
44
+if [ "${COMMAND#/}" != "$COMMAND" ]; then
45
# Absolute path - check if it exists in /host
46
HOST_PATH="/host${COMMAND}"
47
if [ -x "$HOST_PATH" ]; then
0 commit comments