open-nomad/client/allocrunner/taskrunner/getter/util_windows.go
2023-04-10 15:36:59 +00:00

30 lines
659 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
//go:build windows
package getter
import (
"os"
"path/filepath"
)
// lockdown is not implemented on Windows
func lockdown(string, string) error {
return nil
}
// defaultEnvironment is the default minimal environment variables for Windows.
func defaultEnvironment(taskDir string) map[string]string {
tmpDir := filepath.Join(taskDir, "tmp")
return map[string]string{
"HOMEPATH": os.Getenv("HOMEPATH"),
"HOMEDRIVE": os.Getenv("HOMEDRIVE"),
"USERPROFILE": os.Getenv("USERPROFILE"),
"PATH": os.Getenv("PATH"),
"TMP": tmpDir,
"TEMP": tmpDir,
}
}