Skip to content

Commit

Permalink
build: commander latest version not picking up release number (#101)
Browse files Browse the repository at this point in the history
commander package change of command in latest version
  • Loading branch information
onlyonehas authored Feb 14, 2023
1 parent 52d4e80 commit 29bfbdd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/speculate.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ program
.option('-n --name <name>', 'Specify custom name for package')
.parse(process.argv);

const options = program.opts();

// Commander has a magic property called name when not overridden by a parameter
const name = program.name instanceof Function ? undefined : program.name;
const name = options.name instanceof Function ? undefined : options.name;

async function runTasks() {
clean(cwd, projectPkg);

try {
const files = await generate(cwd, projectPkg, program.release, name);
const files = await generate(cwd, projectPkg, options.release, name);
files.forEach((file) => {
// eslint-disable-next-line no-console
console.log('Created ./%s', file);
Expand Down

0 comments on commit 29bfbdd

Please sign in to comment.