File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,15 @@ updateNotifier({pkg: cli.pkg}).notify();
116116
117117const { input, flags : options , showVersion} = cli ;
118118
119+ // TODO: Fix this properly instead of the below workaround.
120+ // Revert behavior of meow >8 to pre-8 (7.1.1) for flags using `isMultiple: true`.
121+ // Otherwise, options defined in package.json can't be merged by lib/options-manager.js `mergeOptions()`.
122+ for ( const key in options ) {
123+ if ( Array . isArray ( options [ key ] ) && options [ key ] . length === 0 ) {
124+ delete options [ key ] ;
125+ }
126+ }
127+
119128// Make data types for `options.space` match those of the API
120129// Check for string type because `xo --no-space` sets `options.space` to `false`
121130if ( typeof options . space === 'string' ) {
You can’t perform that action at this time.
0 commit comments