Skip to content

Commit

Permalink
Fixed problem with bufferedOutput.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sten Roger Sandvik committed Jun 14, 2017
1 parent a96b6ab commit f790378
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/main/groovy/com/moowork/gradle/grunt/GruntTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class GruntTask

// If output should be buffered (useful when running in parallel)
// set standardOutput of ExecRunner to a buffer
def bufferedOutput
ByteArrayOutputStream bufferedOutput
if ( this.project.grunt.bufferOutput )
{
bufferedOutput = new ByteArrayOutputStream()
Expand All @@ -55,10 +55,10 @@ class GruntTask
finally
{
// If we were buffering output, print it
if ( this.project.grunt.bufferOutput )
if ( this.project.grunt.bufferOutput && ( bufferedOutput != null ) )
{
println "Output from ${gruntFile}"
println this.project.grunt.bufferedOutput.toString()
println bufferedOutput.toString()
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/groovy/com/moowork/gradle/gulp/GulpTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class GulpTask

// If output should be buffered (useful when running in parallel)
// set standardOutput of ExecRunner to a buffer
def bufferedOutput
ByteArrayOutputStream bufferedOutput
if ( this.project.gulp.bufferOutput )
{
bufferedOutput = new ByteArrayOutputStream()
Expand All @@ -50,10 +50,10 @@ class GulpTask
finally
{
// If we were buffering output, print it
if ( this.project.gulp.bufferOutput )
if ( this.project.gulp.bufferOutput && ( bufferedOutput != null ) )
{
println "Output from ${this.project.gulp.workDir}/gulpfile.js"
println this.project.gulp.bufferedOutput.toString()
println bufferedOutput.toString()
}
}
}
Expand Down

0 comments on commit f790378

Please sign in to comment.