lint test update

This commit is contained in:
bchadwic 2022-04-05 21:39:51 -07:00 committed by Sam Coe
parent 66a69bdec5
commit e5ebbcb66a
No known key found for this signature in database
GPG key ID: 8E322C20F811D086

View file

@ -121,7 +121,9 @@ func setGitDir(t *testing.T, dir string) {
old_GIT_DIR := os.Getenv("GIT_DIR")
os.Setenv("GIT_DIR", dir)
t.Cleanup(func() {
_ = git.UnsetRemoteResolution("upstream")
if err := git.UnsetRemoteResolution("upstream"); err != nil {
panic(err)
}
os.Setenv("GIT_DIR", old_GIT_DIR)
})
}