1
1
mirror of https://github.com/nektos/act.git synced 2024-09-20 00:39:02 +03:00

fix: invoke login shells to source /etc/environment (#570)

This commit is contained in:
hackercat 2021-03-29 06:35:01 +02:00 committed by GitHub
parent 6cde8f64dc
commit b438b836ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -259,13 +259,13 @@ func (s *Step) ShellCommand() string {
switch s.Shell {
case "", "bash":
shellCommand = "bash --noprofile --norc -e {0}"
shellCommand = "bash --login --norc -e {0}"
case "pwsh":
shellCommand = "pwsh -command \"& '{0}'\""
shellCommand = "pwsh -login -command \"& '{0}'\""
case "python":
shellCommand = "python {0}"
case "sh":
shellCommand = "sh -e -c {0}"
shellCommand = "sh -l -e -c {0}"
case "cmd":
shellCommand = "%ComSpec% /D /E:ON /V:OFF /S /C \"CALL \"{0}\"\""
case "powershell":