@@ -124,7 +124,7 @@ function setUpWebStormTask(context) {
124124 }
125125 }
126126 else if ( key === 'launch' ) {
127- switch ( argv . launch ) {
127+ switch ( String ( argv . launch ) ) {
128128 case 'false' :
129129 break ;
130130 case 'true' :
@@ -195,6 +195,9 @@ function setUpWebStormTask(context) {
195195 . wrap ( 80 ) ;
196196 cliArgs = yargsInstance . argv ;
197197
198+ // launch parameter should be boolean for consistency with defaults
199+ cliArgs . launch = ( cliArgs . launch === 'true' ) ? true : ( cliArgs . launch === 'false' ) ? false : cliArgs . launch ;
200+
198201 gulp . task ( 'webstorm' , function ( done ) {
199202 console . log ( hr ( '-' , 80 , 'webstorm' ) ) ;
200203
@@ -209,14 +212,13 @@ function setUpWebStormTask(context) {
209212 }
210213 // else run the selected items
211214 else {
212- var launch = ( cliArgs . launch !== 'false' ) ;
213215 var taskList = [
214216 cliArgs . subdir && 'webstorm:subdir' ,
215217 cliArgs . project && 'webstorm:project' ,
216218 cliArgs . external && 'webstorm:externaltools' ,
217219 cliArgs . codestyle && 'webstorm:codestyle' ,
218220 cliArgs . templates && 'webstorm:templates' ,
219- launch && 'webstorm:launch'
221+ cliArgs . launch && 'webstorm:launch'
220222 ] . filter ( Boolean ) ;
221223 if ( taskList . length > 0 ) {
222224 runSequence . apply ( runSequence , taskList . concat ( done ) ) ;
0 commit comments