fix: fix issue with run script with no return (#9137)

This commit is contained in:
CityFun 2025-06-17 16:04:02 +08:00 committed by GitHub
parent d68a0b076b
commit 00a5cc654a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -120,9 +120,9 @@ func (c *CommandHelper) run(name string, arg ...string) (string, error) {
cmd.Stdout = file
cmd.Stderr = file
} else if len(c.scriptPath) != 0 {
cmd = exec.Command("bash", c.scriptPath)
cmd.Stdout = &stdout
cmd.Stderr = &stderr
cmd = exec.Command("bash", c.scriptPath)
} else {
cmd.Stdout = &stdout
cmd.Stderr = &stderr