diff --git a/src/cli/commands/publish.js b/src/cli/commands/publish.js index 0cf87b3564..1435ea7edb 100644 --- a/src/cli/commands/publish.js +++ b/src/cli/commands/publish.js @@ -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'); diff --git a/src/reporters/lang/en.js b/src/reporters/lang/en.js index f6f585f07e..d402e27a7c 100644 --- a/src/reporters/lang/en.js +++ b/src/reporters/lang/en.js @@ -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',