Skip to content

Commit 1f600fc

Browse files
authored
chore: use defer instead of t.Cleanup for chdir (coder#6887)
This _might_ resolve the races in `TestTemplatePush`.
1 parent b26f306 commit 1f600fc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cli/templatepush_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,7 @@ func TestTemplatePush(t *testing.T) {
178178
require.NoError(t, err)
179179

180180
os.Chdir(source)
181-
182-
t.Cleanup(func() {
183-
os.Chdir(oldDir)
184-
})
181+
defer os.Chdir(oldDir)
185182

186183
// Don't pass the name of the template, it should use the
187184
// directory of the source.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy