mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-13 12:47:19 +00:00
Option to change temp dir for local backend (#2702)
--- *Sponsored by Kithara Software GmbH*
This commit is contained in:
@@ -22,7 +22,7 @@ import (
|
||||
"github.com/alessio/shellescape"
|
||||
)
|
||||
|
||||
func genCmdByShell(shell string, cmds []string) (args []string, err error) {
|
||||
func (e *local) genCmdByShell(shell string, cmds []string) (args []string, err error) {
|
||||
script := ""
|
||||
for _, cmd := range cmds {
|
||||
script += fmt.Sprintf("echo %s\n%s\n", strings.TrimSpace(shellescape.Quote("+ "+cmd)), cmd)
|
||||
@@ -37,7 +37,7 @@ func genCmdByShell(shell string, cmds []string) (args []string, err error) {
|
||||
script += fmt.Sprintf("@%s\n", cmd)
|
||||
script += "@IF NOT %ERRORLEVEL% == 0 exit %ERRORLEVEL%\n"
|
||||
}
|
||||
cmd, err := os.CreateTemp(os.TempDir(), "*.cmd")
|
||||
cmd, err := os.CreateTemp(e.tempDir, "*.cmd")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user