Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit d32ca1b

Browse files
authored
fix: remove export from install script. (#1538)
* fix: remove export from install script. * Add log line to the run as root export
1 parent 1cd9cd3 commit d32ca1b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Diff for: modules/runners/templates/install-runner.sh

-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ rm -rf $file_name
3737

3838
${ARM_PATCH}
3939

40-
echo "export RUNNER_ALLOW_RUNASROOT=1"
41-
export RUNNER_ALLOW_RUNASROOT=1
42-
4340
os_id=$(awk -F= '/^ID/{print $2}' /etc/os-release)
4441
if [[ "$os_id" =~ ^ubuntu.* ]]; then
4542
echo "Installing dependencies"

Diff for: modules/runners/templates/start-runner.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ echo "Delete GH Runner token from AWS SSM"
5050
aws ssm delete-parameter --name "$environment"-"$instance_id" --region "$region"
5151

5252
if [ -z "$run_as" ]; then
53-
echo "No user specified, using default ec2-user account"
54-
run_as="ec2-user"
53+
echo "No user specified, using default ec2-user account"
54+
run_as="ec2-user"
5555
fi
5656

5757
if [[ "$run_as" == "root" ]]; then
58-
export RUNNER_ALLOW_RUNASROOT=1
58+
echo "run_as is set to root - export RUNNER_ALLOW_RUNASROOT=1"
59+
export RUNNER_ALLOW_RUNASROOT=1
5960
fi
6061

6162
echo "Configure GH Runner as user $run_as"

0 commit comments

Comments
 (0)