Skip to content

Commit 78c655b

Browse files
committed
Fixes linter warning
1 parent e557194 commit 78c655b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/commands/which_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ func TestWhich(t *testing.T) {
2727
t.Run("symbolic link to executable", func(t *testing.T) {
2828
err := os.Symlink(fullPathCmd, sym)
2929
require.NoError(t, err, "cannot create symbolic link '%s-->%s'", sym, fullPathCmd)
30-
defer os.Remove(sym)
30+
defer func() {
31+
err := os.Remove(sym)
32+
assert.NoError(t, err, "cannot remove symbolic link '%s'", sym)
33+
}()
3134

3235
ok := isExecutable(sym)
3336
require.True(t, ok, "executable '%s' not found", sym)

0 commit comments

Comments
 (0)