Git - file system provider should throw FileNotFound if the resource does not exist in git instead of returning an empty file (#236676)

This commit is contained in:
Ladislau Szomoru
2024-12-20 10:08:22 +01:00
committed by GitHub
parent da59ef74e2
commit b9084edd1c

View File

@@ -192,7 +192,8 @@ export class GitFileSystemProvider implements FileSystemProvider {
try {
return await repository.buffer(sanitizeRef(ref, path, repository), path);
} catch (err) {
return new Uint8Array(0);
// File does not exist in git (ex: git ignored)
throw FileSystemError.FileNotFound();
}
}