Commit 4c66101e authored by Robert Knight's avatar Robert Knight

Read parsed CLI options from `commander.opts()`

See https://github.com/tj/commander.js/blob/master/CHANGELOG.md#migration-tips.
parent 394953bf
...@@ -39,7 +39,7 @@ function parseCommandLine() { ...@@ -39,7 +39,7 @@ function parseCommandLine() {
.parse(process.argv); .parse(process.argv);
return { return {
grep: commander.grep, grep: commander.opts().grep,
}; };
} }
......
...@@ -154,12 +154,14 @@ commander ...@@ -154,12 +154,14 @@ commander
.option('--no-cache-entry', 'Prevent CDN/browser caching of entry point') .option('--no-cache-entry', 'Prevent CDN/browser caching of entry point')
.parse(process.argv); .parse(process.argv);
const cliOpts = commander.opts();
const options = { const options = {
tag: commander.tag, tag: cliOpts.tag,
cacheEntry: commander.cacheEntry, cacheEntry: cliOpts.cacheEntry,
}; };
uploadPackageToS3(commander.bucket, options).catch(err => { uploadPackageToS3(cliOpts.bucket, options).catch(err => {
console.error('Failed to upload S3 package', err); console.error('Failed to upload S3 package', err);
process.exit(1); process.exit(1);
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment