mirror of
https://github.com/actions/runner.git
synced 2025-12-12 05:18:38 +00:00
Update AGENT_ALLOW_RUNASROOT to RUNNER_ALLOW_RUNASROOT (#227)
* Update config.sh * Update run.sh
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
user_id=`id -u`
|
user_id=`id -u`
|
||||||
|
|
||||||
# we want to snapshot the environment of the config user
|
# we want to snapshot the environment of the config user
|
||||||
if [ $user_id -eq 0 -a -z "$AGENT_ALLOW_RUNASROOT" ]; then
|
if [ $user_id -eq 0 -a -z "$RUNNER_ALLOW_RUNASROOT" ]; then
|
||||||
echo "Must not run with sudo"
|
echo "Must not run with sudo"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Validate not sudo
|
# Validate not sudo
|
||||||
user_id=`id -u`
|
user_id=`id -u`
|
||||||
if [ $user_id -eq 0 -a -z "$AGENT_ALLOW_RUNASROOT" ]; then
|
if [ $user_id -eq 0 -a -z "$RUNNER_ALLOW_RUNASROOT" ]; then
|
||||||
echo "Must not run interactively with sudo"
|
echo "Must not run interactively with sudo"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user