mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-10 20:01:00 +00:00
local backend ignore errors in commands inbetween (#2636)
for normal posix shells we have to add the `-e ` option ... but as there are more shells out there we have to handle this edgecases on base per base case. create a switch case statement in woodpecker should be fine as there is only a finite number of shells, used in production. also close #2612 --- *Sponsored by Kithara Software GmbH*
This commit is contained in:
@@ -25,6 +25,9 @@ import (
|
||||
// for a linux container using the given
|
||||
func generateScriptPosix(commands []string) string {
|
||||
var buf bytes.Buffer
|
||||
|
||||
buf.WriteString(setupScript)
|
||||
|
||||
for _, command := range commands {
|
||||
buf.WriteString(fmt.Sprintf(
|
||||
traceScript,
|
||||
@@ -32,11 +35,8 @@ func generateScriptPosix(commands []string) string {
|
||||
command,
|
||||
))
|
||||
}
|
||||
script := fmt.Sprintf(
|
||||
setupScript,
|
||||
buf.String(),
|
||||
)
|
||||
return script
|
||||
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
// setupScript is a helper script this is added to the step script to ensure
|
||||
@@ -53,7 +53,6 @@ fi
|
||||
unset CI_NETRC_USERNAME
|
||||
unset CI_NETRC_PASSWORD
|
||||
unset CI_SCRIPT
|
||||
%s
|
||||
`
|
||||
|
||||
// traceScript is a helper script that is added to the step script
|
||||
|
Reference in New Issue
Block a user