Skip to content

Commit

Permalink
restore XDG_RUNTIME_DIR to original value in test
Browse files Browse the repository at this point in the history
Signed-off-by: Cory Bennett <cbennett@netflix.com>
  • Loading branch information
coryb committed Oct 17, 2020
1 parent 53adcbf commit 78b8bdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion console_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestTempConsole(t *testing.T) {
func TestTempConsoleWithXdgRuntimeDir(t *testing.T) {
tmpDir := "/tmp/foo"
// prevent interferring with other tests
defer os.Setenv("XDG_RUNTIME_DIR", "")
defer os.Setenv("XDG_RUNTIME_DIR", os.Getenv("XDG_RUNTIME_DIR"))
if err := os.Setenv("XDG_RUNTIME_DIR", tmpDir); err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 78b8bdd

Please sign in to comment.