Skip to content

Commit

Permalink
refactor(runfiles): improve @bazel/runfiles error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedard committed Oct 11, 2024
1 parent 1e000a3 commit 68b9bd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/runfiles/runfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class Runfiles {
// If the repository mappings were loaded ensure the source repository is valid.
if (!(sourceRepo in this.repoMappings)) {
throw new Error(
`source repository ${sourceRepo} not found in repo mappings: ${JSON.stringify(
`source repository "${sourceRepo}" not found in repo mappings: ${JSON.stringify(
this.repoMappings,
null,
2,
Expand All @@ -181,7 +181,7 @@ export class Runfiles {
if (result) {
return result;
}
const e = new Error(`could not resolve module ${modulePath}`);
const e = new Error(`could not resolve module "${modulePath}" from repository "${sourceRepo}"`);
(e as any).code = 'MODULE_NOT_FOUND';
throw e;
}
Expand Down

0 comments on commit 68b9bd6

Please sign in to comment.