Merge pull request #3707 from cli/fix-test-env

Fix test that was deleting local config folder
This commit is contained in:
Sam 2021-05-24 18:41:41 -04:00 committed by GitHub
commit 6b49b487e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -242,6 +242,7 @@ func Test_configFile_Write_toDisk(t *testing.T) {
configDir := filepath.Join(t.TempDir(), ".config", "gh")
os.Setenv(GH_CONFIG_DIR, configDir)
defer os.Unsetenv(GH_CONFIG_DIR)
defer stubMigrateConfigDir()()
cfg := NewFromString(`pager: less`)
err := cfg.Write()