@@ -103,7 +103,8 @@ gulp.task('modules/build.dart/pubspec', function(done) {
103103 . pipe ( through2 . obj ( function ( file , enc , done ) {
104104 if ( file . previousContents . toString ( ) !== file . contents . toString ( ) ) {
105105 console . log ( file . path + ' changed, calling pub get' ) ;
106- var stream = spawn ( 'pub' , [ 'get' ] , {
106+ var pubCmd = ( process . platform === "win32" ? "pub.bat" : "pub" ) ;
107+ var stream = spawn ( pubCmd , [ 'get' ] , {
107108 stdio : [ process . stdin , process . stdout , process . stderr ] ,
108109 cwd : path . dirname ( file . path )
109110 } ) ;
@@ -186,7 +187,8 @@ gulp.task('analyze/dartanalyzer', function(done) {
186187 } ) ) ;
187188
188189 function analyze ( dirName , done ) {
189- var stream = spawn ( 'dartanalyzer' , [ '--fatal-warnings' , tempFile ] , {
190+ var dartanalyzerCmd = ( process . platform === "win32" ? "dartanalyzer.bat" : "dartanalyzer" ) ;
191+ var stream = spawn ( dartanalyzerCmd , [ '--fatal-warnings' , tempFile ] , {
190192 // inherit stdin and stderr, but filter stdout
191193 stdio : [ process . stdin , 'pipe' , process . stderr ] ,
192194 cwd : dirName
0 commit comments