Skip to content

Commit

Permalink
Use sudo -i to get a full shell for config.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
bshelton229 committed Feb 12, 2024
1 parent 1b4597b commit 6d445f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/runners/templates/start-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ echo "Starting the runner as user $run_as"
# configure the runner if the runner is non ephemeral or jit config is disabled
if [[ "$enable_jit_config" == "false" || $agent_mode != "ephemeral" ]]; then
echo "Configure GH Runner as user $run_as"
sudo --preserve-env=RUNNER_ALLOW_RUNASROOT -u "$run_as" -- ./config.sh --unattended --name "$runner_name_prefix$instance_id" --work "_work" $${config}
sudo --preserve-env=RUNNER_ALLOW_RUNASROOT -i -u "$run_as" -- $PWD/config.sh --unattended --name "$runner_name_prefix$instance_id" --work "_work" $${config}
fi

create_xray_success_segment "$SEGMENT"
Expand Down

0 comments on commit 6d445f5

Please sign in to comment.