chore(scanner): avoid scan failures and report if they happen (#9888)

This commit is contained in:
Simon Frei
2024-12-28 17:09:38 +01:00
committed by GitHub
parent 9c449c966b
commit 1d2c53bf3c
2 changed files with 34 additions and 13 deletions
+6 -2
View File
@@ -239,8 +239,12 @@ func TestNormalization(t *testing.T) {
if fd, err := testFs.OpenFile(filepath.Join("normalization", s1, s2), os.O_CREATE|os.O_EXCL, 0o644); err != nil {
t.Fatal(err)
} else {
fd.Write([]byte("test"))
fd.Close()
if _, err := fd.Write([]byte("test")); err != nil {
t.Fatal(err)
}
if err := fd.Close(); err != nil {
t.Fatal(err)
}
}
}
}