Skip to content

Commit

Permalink
feat: prompt for full name to confirm unpublish action (#782) (#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonatwork authored Nov 7, 2022
1 parent 1dcedef commit d608ecd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ export async function unpublish(options: IUnpublishOptions = {}): Promise<any> {
const fullName = `${publisher}.${name}`;

if (!options.force) {
const answer = await read(`This will FOREVER delete '${fullName}'! Are you sure? [y/N] `);
const answer = await read(`This will delete ALL published versions! Please type '${fullName}' to confirm: `);

if (!/^y$/i.test(answer)) {
if (answer !== fullName) {
throw new Error('Aborted');
}
}
Expand Down

0 comments on commit d608ecd

Please sign in to comment.