summaryrefslogtreecommitdiff
path: root/internal/hexaiaction/cmdentry_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/hexaiaction/cmdentry_test.go')
-rw-r--r--internal/hexaiaction/cmdentry_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/hexaiaction/cmdentry_test.go b/internal/hexaiaction/cmdentry_test.go
index 9c896f6..71ed9db 100644
--- a/internal/hexaiaction/cmdentry_test.go
+++ b/internal/hexaiaction/cmdentry_test.go
@@ -24,7 +24,11 @@ func TestPersistStdin_WritesFile(t *testing.T) {
t.Fatalf("write src: %v", err)
}
f, _ := os.Open(src)
- defer f.Close()
+ defer func() {
+ if err := f.Close(); err != nil {
+ t.Errorf("failed to close temp file: %v", err)
+ }
+ }()
if err := persistStdin(path, f); err != nil {
t.Fatalf("persistStdin: %v", err)
}