Skip to content

Commit 821a15e

Browse files
committed
fix: Crash when called with no inputs. yargs now variadic positional arguments undefined instead of []
1 parent 778d84c commit 821a15e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/build.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module.exports.handler = function build(argv) {
4343
let watcher;
4444
argv._handled = true;
4545

46-
if (!argv.input.length) {
46+
if (!(argv.input && argv.input.length)) {
4747
try {
4848
argv.input = [
4949
JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8'))

0 commit comments

Comments
 (0)