@@ -280,7 +280,7 @@ function parse (args, opts) {
280280 setConfig ( argv )
281281 setConfigObjects ( )
282282 applyEnvVars ( argv , false )
283- applyArrayCoercions ( argv )
283+ applyCoercions ( argv )
284284 applyDefaultsAndAliases ( argv , flags . aliases , defaults )
285285
286286 // for any counts either not in args or without an explicit default, set to 0
@@ -483,11 +483,9 @@ function parse (args, opts) {
483483 } )
484484 }
485485
486- function applyArrayCoercions ( argv ) {
486+ function applyCoercions ( argv ) {
487487 var coerce
488- Object . keys ( argv ) . filter ( function ( key ) {
489- return key === '_' || checkAllAliases ( key , flags . arrays )
490- } ) . forEach ( function ( key ) {
488+ Object . keys ( argv ) . forEach ( function ( key ) {
491489 coerce = checkAllAliases ( key , flags . coercions )
492490 if ( typeof coerce === 'function' ) {
493491 try {
@@ -538,14 +536,6 @@ function parse (args, opts) {
538536 } )
539537
540538 var key = keys [ keys . length - 1 ]
541- var coerce = ! checkAllAliases ( key , flags . arrays ) && checkAllAliases ( key , flags . coercions )
542- if ( typeof coerce === 'function' ) {
543- try {
544- value = coerce ( value )
545- } catch ( err ) {
546- error = err
547- }
548- }
549539
550540 if ( value === increment ) {
551541 o [ key ] = increment ( o [ key ] )
0 commit comments