fix: *env.args.Shell not set in getShellName(cache never used)

*env.args.Shell was never set in getShellName.
This commit is contained in:
Laurent Nullens 2020-12-27 19:51:32 +01:00 committed by Jan De Dobbeleer
parent b4d23a4716
commit 8c812812ee

View file

@ -233,8 +233,9 @@ func (env *environment) getShellName() string {
if err != nil { if err != nil {
return unknown return unknown
} }
shell := strings.Replace(name, ".exe", "", 1) // Cache the shell value to speed things up.
return strings.Trim(shell, " ") *env.args.Shell = strings.Trim(strings.Replace(name, ".exe", "", 1), " ")
return *env.args.Shell
} }
func (env *environment) doGet(url string) ([]byte, error) { func (env *environment) doGet(url string) ([]byte, error) {