Skip to content

Commit d608ecd

Browse files
authored
feat: prompt for full name to confirm unpublish action (#782) (#783)
1 parent 1dcedef commit d608ecd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/publish.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ export async function unpublish(options: IUnpublishOptions = {}): Promise<any> {
242242
const fullName = `${publisher}.${name}`;
243243

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

247-
if (!/^y$/i.test(answer)) {
247+
if (answer !== fullName) {
248248
throw new Error('Aborted');
249249
}
250250
}

0 commit comments

Comments
 (0)