Skip to content
Snippets Groups Projects
Commit b18fe493 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

[docker-prepare] Use runuser instead of sudo

sudo may not be available in the image, and runuser is preferred for
this use-case anyway.
parent c9e8b1d3
No related branches found
No related tags found
No related merge requests found
......@@ -9,5 +9,12 @@ shift
cd "${OUTSIDE_EMPER_ROOT}"
# shellcheck disable=SC2068
exec sudo -u user $@
if [[ $@ ]]; then
exec runuser -u user -- $@
else
# use --login so that clang is in path
runuser -u user -- /bin/bash --rcfile <(echo "cd ${OUTSIDE_EMPER_ROOT}") -l
fi
# Fallback into a root shell
/bin/bash -l
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment