aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/os/exec/lp_unix_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/os/exec/lp_unix_test.go')
-rw-r--r--src/pkg/os/exec/lp_unix_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pkg/os/exec/lp_unix_test.go b/src/pkg/os/exec/lp_unix_test.go
index 3cba13e427..625d784864 100644
--- a/src/pkg/os/exec/lp_unix_test.go
+++ b/src/pkg/os/exec/lp_unix_test.go
@@ -32,7 +32,10 @@ func TestLookPathUnixEmptyPath(t *testing.T) {
if err != nil {
t.Fatal("OpenFile failed: ", err)
}
- defer f.Close()
+ err = f.Close()
+ if err != nil {
+ t.Fatal("Close failed: ", err)
+ }
pathenv := os.Getenv("PATH")
defer os.Setenv("PATH", pathenv)