2023-04-10 15:36:59 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2022-12-07 22:02:25 +00:00
|
|
|
//go:build windows
|
|
|
|
|
|
|
|
package getter
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
)
|
|
|
|
|
2023-03-16 16:31:18 +00:00
|
|
|
// lockdown is not implemented on Windows
|
2023-01-09 15:46:32 +00:00
|
|
|
func lockdown(string, string) error {
|
2022-12-07 22:02:25 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2022-12-09 21:46:07 +00:00
|
|
|
// defaultEnvironment is the default minimal environment variables for Windows.
|
|
|
|
func defaultEnvironment(taskDir string) map[string]string {
|
2022-12-07 22:02:25 +00:00
|
|
|
tmpDir := filepath.Join(taskDir, "tmp")
|
2022-12-09 21:46:07 +00:00
|
|
|
return map[string]string{
|
|
|
|
"HOMEPATH": os.Getenv("HOMEPATH"),
|
|
|
|
"HOMEDRIVE": os.Getenv("HOMEDRIVE"),
|
|
|
|
"USERPROFILE": os.Getenv("USERPROFILE"),
|
|
|
|
"PATH": os.Getenv("PATH"),
|
|
|
|
"TMP": tmpDir,
|
|
|
|
"TEMP": tmpDir,
|
2022-12-07 22:02:25 +00:00
|
|
|
}
|
|
|
|
}
|