Skip to content

Commit

Permalink
feat: Log publish error during development
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbo2002 committed Apr 16, 2024
1 parent ed15fde commit 16139d5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,14 @@ export async function updateVersionJson (file: string, context: VerifyReleaseCon

export async function publish (config: NormalizedPluginConfig, context: VerifyConditionsContext): Promise<void> {
context.logger.log(`Run jsr publish in ${config.cwd} with ${JSON.stringify(config.publish)}`);
await jsrPublish(config.cwd, config.publish);

try {
await jsrPublish(config.cwd, config.publish);
}
catch (error) {
context.logger.error(error instanceof Error ? error.stack : error);
throw error;
}
}

export function generatePublishResponse (config: NormalizedPluginConfig, context: PublishResponseContext): PublishResponse {
Expand Down

0 comments on commit 16139d5

Please sign in to comment.