       outputDirectory
     ]
 
-    grunt.util.spawn {cmd, args}, (error, result, code) ->
+    spawn {cmd, args}, (error, result, code) ->
       return done(error) if error?
 
       nupkgPath = path.join(outputDirectory, "#{metadata.name}.#{metadata.version}.nupkg")

        '--loadingGif'
        loadingGif
      ]
      grunt.util.spawn {cmd, args}, (error, result, code) ->
        grunt.log.writeln result
        grunt.log.writeln code
        done(error)

temp.track()

module.exports = (grunt) ->
  spawn = (options, callback) ->
    spawnedProcess = grunt.util.spawn(options, callback)
    spawnedProcess.on('error', callback)

  grunt.registerTask 'create-windows-installer', 'Create the Windows installer', ->
    @requiresConfig("#{@name}.appDirectory")

