       args = ['fetch', 'origin', 'master']
       git.addGitToEnv(process.env)
       @spawn command, args, {cwd: repoPath}, (code, stderr='', stdout='') ->
-        return callback(code) unless code is 0
+        return callback(new Error('Exit code: ' + code + ' - ' + stderr)) unless code is 0
         repo = Git.open(repoPath)
         sha = repo.getReferenceTarget(repo.getUpstreamBranch('refs/heads/master'))
         if sha isnt pack.apmInstallSource.sha


  getAvailableUpdates: (packages, callback) ->
    getLatestVersionOrSha = (pack, done) =>
      if pack.apmInstallSource?.type is 'git'
        @getLatestSha pack, (err, sha) ->
          done(err, {pack, sha})
      else

        callback()
    else
      @loadInstalledAtomMetadata(callback)

  folderIsRepo: (pack) ->
    repoGitFolderPath = path.join(@atomPackagesDirectory, pack.name, '.git')
    return fs.existsSync repoGitFolderPath

  getLatestVersion: (pack, callback) ->
    requestSettings =
