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

pull/226577/head^2
Ladislau Szomoru 2024-12-20 10:08:22 +01:00 committed by GitHub
parent da59ef74e2
commit b9084edd1c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

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();
}
}