1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-11-23 21:44:44 +02:00

local backend set home variable windows-equivalent too (#2323)

This commit is contained in:
6543
2023-10-01 13:56:49 +01:00
committed by GitHub
parent dd335f43f7
commit 8629a418f8
3 changed files with 15 additions and 7 deletions

View File

@@ -14,7 +14,10 @@
package local
import "errors"
import (
"errors"
"fmt"
)
// notAllowedEnvVarOverwrites are all env vars that can not be overwritten by step config
var notAllowedEnvVarOverwrites = []string{
@@ -36,3 +39,12 @@ machine %s
login %s
password %s
`
func genNetRC(env map[string]string) string {
return fmt.Sprintf(
netrcFile,
env["CI_NETRC_MACHINE"],
env["CI_NETRC_USERNAME"],
env["CI_NETRC_PASSWORD"],
)
}