cli-confirm
Advanced tools
Comparing version
@@ -13,7 +13,7 @@ #!/usr/bin/env node | ||
console.log(`${chunk}`) | ||
if (['y', 'n', 'c'].indexOf(chunk.toLowerCase())) { | ||
if (chunk.toLowerCase() === 'y') { | ||
process.exit(0) | ||
} else { | ||
process.exit(1) | ||
} else { | ||
process.exit(0) | ||
} | ||
}) |
{ | ||
"name": "cli-confirm", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Tiny module to confirm execution of npm scripts", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "cli-confirm 'Are you sure?'" | ||
"test": "cli-confirm \"Are you sure?\" && echo \"do it\"" | ||
}, | ||
@@ -9,0 +9,0 @@ "bin": { |
@@ -14,3 +14,3 @@ # cli-confirm | ||
"scripts" { | ||
"self-destruct-servers": "cli-confirm 'Do you really want to blow up the servers?' && npm run destroy:servers", | ||
"self-destruct-servers": "cli-confirm \"Do you really want to blow up the servers?\" && npm run destroy:servers", | ||
} | ||
@@ -17,0 +17,0 @@ […] |
1708
0.29%