fix: distinguish evidence tree lookup failures
This commit is contained in:
@@ -278,8 +278,10 @@ export class GitWorkspaceRepository {
|
||||
);
|
||||
return stdout;
|
||||
} catch (error) {
|
||||
if (invalidObjectMessage && typeof error === "object" && error !== null
|
||||
&& "code" in error && typeof error.code === "number") {
|
||||
const stderr = typeof error === "object" && error !== null && "stderr" in error
|
||||
&& typeof error.stderr === "string" ? error.stderr : "";
|
||||
if (invalidObjectMessage
|
||||
&& /^fatal: path '[^']+' does not exist in '[0-9a-f]{40}'\s*$/u.test(stderr)) {
|
||||
throw new WorkspaceRegistryError("workspace_invalid", invalidObjectMessage);
|
||||
}
|
||||
throw this.sanitizeGitError(error);
|
||||
|
||||
Reference in New Issue
Block a user