Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
grzpab committed Dec 21, 2023
1 parent 0de1ded commit f85046d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/handlePublishCliCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,21 @@ export const handlePublishCliCommand = async (
formData.append('description.md', descriptionMdData);
}

await publish(token, formData);
try {
await publish(token, formData);
} catch (error) {
const message = error instanceof Error ? error.message : String(error);

printer.printConsoleMessage(
'error',
`Could not publish the "${pkg.name}" package: ${message}`,
);
}

printer.printConsoleMessage(
'info',
`Published the "${pkg.name}" package successfully`,
);

try {
await codemodDownloader.download(pkg.name);
Expand Down

0 comments on commit f85046d

Please sign in to comment.