From 3596822bab9efd3eac4fd85b363f780d27005a12 Mon Sep 17 00:00:00 2001 From: Anthony Raymond Date: Sun, 15 Dec 2019 01:02:33 +0100 Subject: [PATCH] Fix wrong variable scope in tests The `err` used in the cleaning function was reporting error about the absolute path fails. It now reports fails to remove folder --- watcher_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/watcher_test.go b/watcher_test.go index 4453b99..bfa43a7 100644 --- a/watcher_test.go +++ b/watcher_test.go @@ -58,7 +58,7 @@ func setup(t testing.TB) (string, func()) { t.Fatal(err) } return abs, func() { - if os.RemoveAll(testDir); err != nil { + if err = os.RemoveAll(testDir); err != nil { t.Fatal(err) } }