breakpointHook: enter the build as nixbld instead of root

This commit is contained in:
langsjo
2025-12-20 21:44:18 +02:00
parent a6a99d0a30
commit e8446c8acb
+1 -1
View File
@@ -73,7 +73,7 @@ pwd="$(readlink /proc/$pid/cwd)"
# bash needs to be executed with --init-file /build/env-vars to include the bash native
# variables like ones declared via `declare -a`.
# If another shell is chosen via `debugShell`, it will only have simple env vars avaialable.
exec nsenter --mount --ipc --uts --pid --net --target "$pid" "$bashInteractive" -c "
exec nsenter --mount --ipc --uts --pid --user --setuid follow --setgid follow --net --target "$pid" "$bashInteractive" -c "
set -eu -o pipefail
source \"$buildDir/env-vars\"
cd \"$pwd\"