Skip to content

Commit 6fbef27

Browse files
bug/issue nektos#2448 - manage special bash options when no shell is defined - lint error
1 parent db2cf14 commit 6fbef27

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/model/workflow.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ type Step struct {
573573
Run string `yaml:"run"`
574574
WorkingDirectory string `yaml:"working-directory"`
575575
// WorkflowShell is the shell really configured in the job, directly at step level or higher in defaults.run.shell
576-
WorkflowShell string
576+
WorkflowShell string `yaml:"-"`
577577
Shell string `yaml:"shell"`
578578
Env yaml.Node `yaml:"env"`
579579
With map[string]string `yaml:"with"`
@@ -620,9 +620,9 @@ func (s *Step) ShellCommand() string {
620620
shellCommand = "bash -e {0}"
621621
case "bash":
622622
if s.WorkflowShell == "" {
623-
shellCommand = "bash -e {0}"
623+
shellCommand = "bash -e {0}"
624624
} else {
625-
shellCommand = "bash --noprofile --norc -e -o pipefail {0}"
625+
shellCommand = "bash --noprofile --norc -e -o pipefail {0}"
626626
}
627627
case "pwsh":
628628
shellCommand = "pwsh -command . '{0}'"

0 commit comments

Comments
 (0)