Skip to content

Commit

Permalink
feat(cli): improve error message when file resolver can't find file (#…
Browse files Browse the repository at this point in the history
…5134) (#5145)

* feat(cli): improve error message when file resolver can't find file (#5134)

* Update en.js

* Update en.js
  • Loading branch information
iansu authored and arcanis committed Jan 15, 2018
1 parent 3ac8334 commit eaa9be8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/reporters/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const messages = {
invalidVersion: 'Invalid version supplied.',
requiredVersionInRange: 'Required version in range.',
packageNotFoundRegistry: "Couldn't find package $0 on the $1 registry.",
doesntExist: "$0 doesn't exist.",
doesntExist: "Package $1 refers to a non-existing file '$0'.",
missingRequiredPackageKey: `Package $0 doesn't have a $1.`,
invalidAccess: 'Invalid argument for access, expected public or restricted.',
invalidCommand: 'Invalid subcommand. Try $0',
Expand Down
2 changes: 1 addition & 1 deletion src/resolvers/exotics/file-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class FileResolver extends ExoticResolver {
return manifest;
}
if (!await fs.exists(loc)) {
throw new MessageError(this.reporter.lang('doesntExist', loc));
throw new MessageError(this.reporter.lang('doesntExist', loc, this.pattern.split('@')[0]));
}

const manifest: Manifest = await (async () => {
Expand Down

0 comments on commit eaa9be8

Please sign in to comment.