mirror of
https://github.com/cupcakearmy/unbrew.git
synced 2024-12-22 16:16:26 +00:00
exit if nothing is selected
This commit is contained in:
parent
5fe4d2b195
commit
ef48dd9033
@ -50,6 +50,10 @@ async function main() {
|
|||||||
])
|
])
|
||||||
|
|
||||||
loosers = getLoosers(keepers, leaves)
|
loosers = getLoosers(keepers, leaves)
|
||||||
|
if (loosers.length === 0) {
|
||||||
|
console.log(chalk.bold('No package/s selected for deletion.'))
|
||||||
|
return
|
||||||
|
}
|
||||||
const { confirmed } = await inquirer.prompt([
|
const { confirmed } = await inquirer.prompt([
|
||||||
{
|
{
|
||||||
type: 'confirm',
|
type: 'confirm',
|
||||||
@ -78,4 +82,6 @@ async function main() {
|
|||||||
|
|
||||||
console.log(chalk.bold.green('🚀 Done'))
|
console.log(chalk.bold.green('🚀 Done'))
|
||||||
}
|
}
|
||||||
main()
|
main().finally(() => {
|
||||||
|
console.log(chalk.blue('Bye Bye 👋'))
|
||||||
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user