Skip to content

Commit

Permalink
Fix wrong variable scope in tests
Browse files Browse the repository at this point in the history
The `err` used in the cleaning function was reporting error about the absolute path fails. It now reports fails to remove folder
  • Loading branch information
anthonyraymond authored and dideler committed Apr 23, 2020
1 parent 136b4ec commit 12ec980
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 12ec980

Please sign in to comment.