From 6cef03bffacd5621cfed4a9db2461b81114de052 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 12 Apr 2024 02:20:34 -0700 Subject: [PATCH] debug: common: run programs in a way that is compatible with alpine doas-sudo-shim (#53) doas sudo shim (as used by Alpine) does not support passing through environment variables in the same way that sudo does, therefore use `sh -c` instead. Signed-off-by: Ariadne Conill --- hack/debug/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/debug/common.sh b/hack/debug/common.sh index f9c3683..5156af8 100644 --- a/hack/debug/common.sh +++ b/hack/debug/common.sh @@ -28,5 +28,5 @@ build_and_run() { fi RUST_TARGET="$(./hack/build/target.sh)" ./hack/build/cargo.sh build ${CARGO_BUILD_FLAGS} --bin "${EXE_TARGET}" - exec sudo RUST_LOG="${RUST_LOG}" "target/${RUST_TARGET}/debug/${EXE_TARGET}" "${@}" + exec sudo sh -c "RUST_LOG='${RUST_LOG}' 'target/${RUST_TARGET}/debug/${EXE_TARGET}' $*" }