(argv)
| 211 | } |
| 212 | |
| 213 | function parseArgs(argv) { |
| 214 | const out = { dryRun: false, firstPublish: false, yes: false } |
| 215 | for (let i = 0; i < argv.length; i++) { |
| 216 | const a = argv[i] |
| 217 | if (a === '--dry-run') out.dryRun = true |
| 218 | else if (a === '--first-publish') out.firstPublish = true |
| 219 | else if (a === '--yes' || a === '-y') out.yes = true |
| 220 | else if (a === '--repo') out.repo = argv[++i] |
| 221 | else if (a === '--file') out.file = argv[++i] |
| 222 | else fail(`Unknown argument: ${a}`) |
| 223 | } |
| 224 | return out |
| 225 | } |
| 226 | |
| 227 | function run(cmd, cmdArgs, opts = {}) { |
| 228 | return execFileSync(cmd, cmdArgs, { stdio: 'inherit', ...opts }) |
no test coverage detected