Skip to content

Commit

Permalink
Show error message to user when publishing fails (#5771)
Browse files Browse the repository at this point in the history
  • Loading branch information
sth authored and arcanis committed May 2, 2018
1 parent 2c88558 commit a35a4f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cli/commands/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ async function publish(config: Config, pkg: any, flags: Object, dir: string): Pr
body: root,
});
} catch (error) {
throw new MessageError(config.reporter.lang('publishFail'));
throw new MessageError(config.reporter.lang('publishFail', error.message));
}

await config.executeLifecycleScript('publish');
Expand Down
2 changes: 1 addition & 1 deletion src/reporters/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ const messages = {
incorrectCredentials: 'Incorrect username or password.',
clearedCredentials: 'Cleared login credentials.',

publishFail: "Couldn't publish package.",
publishFail: "Couldn't publish package: $0",
publishPrivate: 'Package marked as private, not publishing.',
published: 'Published.',
publishing: 'Publishing',
Expand Down

0 comments on commit a35a4f9

Please sign in to comment.