We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6ebde82 + 100048b commit cc1cdc7Copy full SHA for cc1cdc7
1 file changed
internal/main_test.go
@@ -22,9 +22,8 @@ func TestMain(m *testing.M) {
22
os.Exit(1)
23
}
24
25
- if err := os.Setenv("HOME", dir); err != nil {
26
- os.Exit(1)
27
- }
+ origHome := os.Getenv("HOME")
+ _ = os.Setenv("HOME", dir) // skipcq: GO-W1032
28
29
// Override spinnerFunc with a mock to prevent data races from async goroutines
30
spinnerFunc = func(_ string) (spinner, error) {
@@ -38,6 +37,8 @@ func TestMain(m *testing.M) {
38
37
39
code := m.Run()
40
+ _ = os.Setenv("HOME", origHome) // skipcq: GO-W1032
41
+
42
if err := os.RemoveAll(dir); err != nil {
43
44
0 commit comments