Merge pull request #1107 from mostynb/test_environment_tempdir
Save the temp dir before clearing environment variables
This commit is contained in:
commit
3b22cad8d7
@ -14,6 +14,8 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
var osTempDir = os.TempDir()
|
||||
|
||||
var boolFlagTests = []struct {
|
||||
name string
|
||||
expected string
|
||||
@ -1662,7 +1664,7 @@ func TestFlagFromFile(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("APP_FOO", "123")
|
||||
|
||||
temp, err := ioutil.TempFile("", "urfave_cli_test")
|
||||
temp, err := ioutil.TempFile(osTempDir, "urfave_cli_test")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user