Skip to content

Commit

Permalink
feat(cli): improve error message when file resolver can't find file (y…
Browse files Browse the repository at this point in the history
  • Loading branch information
iansu committed Jan 2, 2018
1 parent 0691037 commit b13e090
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/reporters/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ 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:
"$0 doesn't exist. It may have been moved or deleted. You can remove the package with the command: `yarn remove $1`",
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 b13e090

Please sign in to comment.