fix: don't fail on malformed pointer files (#3095)
This commit is contained in:
@ -389,8 +389,11 @@ export default class GitGateway implements Implementation {
|
||||
|
||||
return filesPromise
|
||||
.then(items =>
|
||||
items.map(({ file: { id }, data }) => {
|
||||
items.map(({ file: { id, path }, data }) => {
|
||||
const parsedPointerFile = parsePointerFile(data);
|
||||
if (!parsedPointerFile.sha) {
|
||||
console.warn(`Failed parsing pointer file ${path}`);
|
||||
}
|
||||
return [
|
||||
{
|
||||
pointerId: id,
|
||||
|
@ -16,7 +16,7 @@ export const parsePointerFile: (data: string) => PointerFile = flow([
|
||||
fromPairs,
|
||||
({ size, oid, ...rest }) => ({
|
||||
size: parseInt(size),
|
||||
sha: oid.split(':')[1],
|
||||
sha: oid?.split(':')[1],
|
||||
...rest,
|
||||
}),
|
||||
]);
|
||||
|
Reference in New Issue
Block a user