Skip to content

Commit 5e0e815

Browse files
committed
nvim: set XDG_CONFIG_HOME and XDG_DATA_HOME envs to empty
Signed-off-by: Koichi Shiraishi <[email protected]>
1 parent 2607f63 commit 5e0e815

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

nvim/nvim_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,19 @@ import (
1616
func newChildProcess(tb testing.TB) (v *Nvim, cleanup func()) {
1717
tb.Helper()
1818

19+
envs := os.Environ()
20+
envs = append(envs, []string{
21+
"XDG_CONFIG_HOME=",
22+
"XDG_DATA_HOME=",
23+
}...)
24+
1925
ctx := context.Background()
2026
opts := []ChildProcessOption{
2127
ChildProcessCommand(BinaryName),
2228
ChildProcessArgs("-u", "NONE", "-n", "-i", "NONE", "--embed", "--headless"),
2329
ChildProcessContext(ctx),
2430
ChildProcessLogf(tb.Logf),
31+
ChildProcessEnv(envs),
2532
}
2633
n, err := NewChildProcess(opts...)
2734
if err != nil {

0 commit comments

Comments
 (0)