mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-03 20:50:24 +00:00
Let the backend engine report the current platform (#2688)
if you run woodpecker-agent on windows and connect it to an docker daemon, there could be two different platforms possible, as you can switch from linux to windows mode and visa versa --- *Sponsored by Kithara Software GmbH*
This commit is contained in:
@@ -16,12 +16,11 @@ package common
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func GenerateContainerConf(commands []string) (env map[string]string, entry, cmd []string) {
|
||||
func GenerateContainerConf(commands []string, goos string) (env map[string]string, entry, cmd []string) {
|
||||
env = make(map[string]string)
|
||||
if runtime.GOOS == "windows" {
|
||||
if goos == "windows" {
|
||||
env["CI_SCRIPT"] = base64.StdEncoding.EncodeToString([]byte(generateScriptWindows(commands)))
|
||||
env["HOME"] = "c:\\root"
|
||||
env["SHELL"] = "powershell.exe"
|
||||
|
Reference in New Issue
Block a user