         else
           deferred.resolve()
         return deferred.promise
-      saveCurrentDependencyToJson cacheName, version
+      saveCurrentDependencyToJson name, version
     else
       saveBowerJson()
 

      if isSerialInstall
        for key in Object.keys(installed)
          i = installed[key]
          log.i "Installed: #{i.pkgMeta.name}##{i.pkgMeta.version}#{if offline then " (offline)"}"
        hasDependencies = Object.keys(installed).length > 1
        if cached and validate and !hasDependencies
          # Installed with cache, but validation occurred

    jsonStr = JSON.stringify json, null, '  '
    fs.writeFileSync 'bower.json', jsonStr

  checkCache = (item) ->
    name = item.name
    version = item.version
    cacheName = item.cacheName
    deferred = Q.defer()
    bower.commands.cache.list [cacheName], {}, {}
    .on 'error', (err) ->
