Skip to content

Commit

Permalink
fix(#113): command builder for boolean args
Browse files Browse the repository at this point in the history
  • Loading branch information
kay-schecker committed Nov 5, 2020
1 parent cb20d03 commit 49d9b4c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/generator-cli/src/app/services/generator.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,17 @@ export class GeneratorService {
switch (typeof v) {
case 'object':
return `"${Object.entries(v).map(z => z.join('=')).join(',')}"`
case 'boolean':
case 'number':
case 'bigint':
return `${v}`
case 'boolean':
return undefined
default:
return `"${v}"`
}
})()

return `--${key}=${value}`
return value === undefined ? `--${key}` : `--${key}=${value}`
}).join(' ')

const ext = path.extname(absoluteSpecPath)
Expand Down

0 comments on commit 49d9b4c

Please sign in to comment.