MCPcopy Index your code
hub / github.com/getsops/sops / overwriteUserConfigDir

Function overwriteUserConfigDir

age/keysource_test.go:582–592  ·  view source on GitHub ↗

overwriteUserConfigDir sets the user config directory and the user home directory based on the os.UserConfigDir logic.

(t *testing.T, path string)

Source from the content-addressed store, hash-verified

580// overwriteUserConfigDir sets the user config directory and the user home directory
581// based on the os.UserConfigDir logic.
582func overwriteUserConfigDir(t *testing.T, path string) {
583 switch runtime.GOOS {
584 case "windows":
585 t.Setenv("AppData", path)
586 case "plan9": // This adds "/lib" as a suffix to $home
587 t.Setenv("home", path)
588 default: // Unix
589 t.Setenv("XDG_CONFIG_HOME", path)
590 t.Setenv("HOME", path)
591 }
592}
593
594// Make sure that on all supported platforms but Windows, XDG_CONFIG_HOME
595// can be used to specify the user's home directory. For most platforms

Callers 3

TestMasterKey_DecryptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected