Files
wehub-resource-sync ead81af521
CI / go (push) Waiting to run
CI / build (darwin, macos-14) (push) Waiting to run
CI / build (windows, windows-2025) (push) Waiting to run
Deploy to GitHub Pages / deploy (push) Failing after 0s
chore: import upstream snapshot with attribution
2026-07-13 12:31:13 +08:00

23 lines
504 B
Go

//go:build windows
package luaplugin
import "os"
func minimalExecEnv() []string {
home := homeEnv()
env := []string{
"PATH=" + os.Getenv("PATH"),
"HOME=" + home,
"USERPROFILE=" + home,
}
// Pass through the Windows variables subprocesses commonly need; skip
// any that are unset.
for _, key := range []string{"APPDATA", "LOCALAPPDATA", "ComSpec", "PATHEXT", "SystemRoot", "WINDIR", "TEMP", "TMP"} {
if v := os.Getenv(key); v != "" {
env = append(env, key+"="+v)
}
}
return env
}