Add more error handling

This commit is contained in:
Alexander Neumann committed 2021-01-30 20:19:47 +01:00
1 parent aef3658a5f
commit 0858fbf6aa
23 files changed
+91 -36

No files matched your search

+6 -1
View File
@@ -17,7 +17,12 @@ func TestCacheDirEnv(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer os.Unsetenv("RESTIC_CACHE_DIR")
defer func() {
err := os.Unsetenv("RESTIC_CACHE_DIR")
if err != nil {
t.Fatal(err)
}
}()
}
dir, err := DefaultDir()