1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-06 03:13:48 +02:00
goreleaser/internal/pipe/git
Eng Zer Jun 73e59160de
test: use t.Setenv to set env vars (#4140)
We have been using `t.Setenv` is most of our tests. This PR replaces the
remaining `os.Setenv` with `t.Setenv`.

Reference: https://pkg.go.dev/testing#T.Setenv

```go
func TestFoo(t *testing.T) {
	// before
	os.Setenv(key, "new value")
	defer os.Unsetenv(key)
	
	// after
	t.Setenv(key, "new value")
}
```

---------

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-06-25 09:54:10 -03:00
..
doc.go refactor: better package organization 2018-09-12 14:18:01 -03:00
errors.go docs: improve wording/formatting in several places (#3384) 2022-09-17 00:13:09 -03:00
git_test.go test: use t.Setenv to set env vars (#4140) 2023-06-25 09:54:10 -03:00
git.go feat: IsGitDirty template variable (#3967) 2023-05-02 01:04:18 -03:00