git: print more info when relative path not found

This commit is contained in:
Ulugbek Abdullaev
2023-10-03 15:36:43 +02:00
parent d4586b43cd
commit c6dcdc753b
+3 -1
View File
@@ -1166,7 +1166,9 @@ export class Repository {
const element = elements.filter(file => file.file.toLowerCase() === relativePathLowercase)[0];
if (!element) {
throw new GitError({ message: 'Git relative path not found.' });
throw new GitError({
message: `Git relative path not found. Was looking for ${relativePathLowercase} among ${JSON.stringify(elements.map(({ file }) => file), null, 2)}`,
});
}
return element.file;