Spea / SpBowerBundle

Symfony2 Bundle to handle asset dependencies with bower
231 stars 44 forks source link

Cache:clear fails when github.com is not available #127

Closed integratedforpublishers closed 9 years ago

integratedforpublishers commented 9 years ago

When github.com is not available, clearing the Symfony cache (php app/console cache:clear) fails with an error message as below. What's the reason to make a connection to github just for clearing the cache?

  [Sp\BowerBundle\Bower\Exception\CommandException]
  Something went wrong while executing the command '/usr/local/bin/bower' 'list' '--json'
   [{
    "level": "info",
    "id": "check-new",
    "message": "Checking for new versions of the project dependencies..",
    "data": {}
  }, {
    "code": "ECMDERR",
    "details": "fatal: unable to connect to github.com:\ngithub.com[0: 192.30.252.128]:     errno=Connection timed out\n\n",
    "exitCode": 128,
    "id": "ECMDERR",
    "level": "error",
    "data": {},
    "message": "Failed to execute \"git ls-remote --tags --heads     git://github.com/twitter/typeahead.js\", exit code of #128",
    "stacktrace": "Error: Failed to execute \"git ls-remote --tags --heads     git://github.com/twitter/typeahead.js\", exit code of #128\n    at createError
  (/usr/local/lib/node_modules/bower/lib/util/createError.js:4:15)\n    at ChildProcess.<anonymous>     (/usr/local/lib/node_modules/bower/lib/util/cmd.js:102
  :21)\n    at ChildProcess.emit (events.js:98:17)\n    at maybeClose (child_process.js:755:16)\n        at Socket.<anonymous> (child_process.js:968:11)\n
  at Socket.emit (events.js:95:17)\n    at Pipe.close (net.js:465:12)"
  }]
Spea commented 9 years ago

cache:clear does not only clear the cache, but also warms it up. You can disable this behaviour with --no-warmup

integratedforpublishers commented 9 years ago

Thanks, I noticed the setting install_on_warmup to false in the config.yml solves the problem.

sp_bower:
    install_on_warmup: false