Skip to content

Commit

Permalink
Load custom path from /etc/environment
Browse files Browse the repository at this point in the history
  • Loading branch information
whywaita committed Jan 8, 2025
1 parent 226212c commit 1d60a50
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/starter/scripts.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,14 @@ fi
#---------------------------------------
# run!
#---------------------------------------
# GitHub-hosted runner load /etc/environment in /opt/runner/provisioner/provisioner.
# So, we need to load /etc/environment for job on self-hosted runner.
{{ if eq .RunnerArg "--once" -}}
echo "./bin/runsvc.sh {{.RunnerArg}}"
${sudo_prefix}./bin/runsvc.sh {{.RunnerArg}}
${sudo_prefix}bash -c "source /etc/environment; ./bin/runsvc.sh {{.RunnerArg}}"
{{ else -}}
echo "./bin/runsvc.sh"
${sudo_prefix}./bin/runsvc.sh
${sudo_prefix}bash -c "source /etc/environment; ./bin/runsvc.sh"
{{ end }}`

0 comments on commit 1d60a50

Please sign in to comment.