mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
* func: Allow custom paths to be added the the getter landlock Fixes: 20315 * fix: slices imports fix: more meaningful examples fix: improve documentation fix: quote error output
30 lines
670 B
Go
30 lines
670 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
//go:build windows
|
|
|
|
package getter
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
// lockdown is not implemented on Windows
|
|
func lockdown(string, 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,
|
|
}
|
|
}
|