From 12ec98040ef17643ea3b2bf97328ca07d4785518 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 24bbc07..292bc51 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) } }