         loadingGif
       ]
 
-      spawn {cmd, args}, (error) ->
+      exec {cmd, args}, (error) ->
         return done(error) if error?
 
         if metadata.productName

_ = require 'underscore'

module.exports = (grunt) ->
  spawn = (options, callback) ->
    stdout = ''
    stderr = ''
    error = null

    ChildProcess.execFile options.cmd, options.args, (error, stdout, stderr) ->
      grunt.log.error(stderr) if stderr
      callback(error)

      nugetOutput
    ]

    exec {cmd, args}, (error) ->
      return done(error) if error?

      nupkgPath = path.join(nugetOutput, "#{metadata.name}.#{metadata.version}.nupkg")
