metricfu / metric_fu

A fist full of code metrics
http://metricfu.github.com/metric_fu
MIT License
627 stars 96 forks source link

Error in Launchy/no browser in CI system #244

Closed johannesluedke closed 4 years ago

johannesluedke commented 9 years ago

I upgraded to metric_fu 4.11.2 as proposed in https://github.com/metricfu/metric_fu/issues/241, now I get a different error... It seems that he assumes to have a browser on a CI system, which of cause isn't present

..lib/ruby/gems/2.0.0/gems/launchy-2.3.0/lib/launchy/applications/browser.rb:62:in `browser_cmdline': Unable to find a browser command. If this is unexpected, Please rerun with environment variable LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at https://github.com/copiousfreetime/launchy/issues/new (Launchy::CommandNotFoundError)
  from ../lib/ruby/gems/2.0.0/gems/launchy-2.3.0/lib/launchy/applications/browser.rb:66:in `cmd_and_args'
  from ../lib/ruby/gems/2.0.0/gems/launchy-2.3.0/lib/launchy/applications/browser.rb:77:in `open'
  from ../lib/ruby/gems/2.0.0/gems/launchy-2.3.0/lib/launchy.rb:29:in `open'
  from ../lib/ruby/gems/2.0.0/gems/metric_fu-4.11.2/lib/metric_fu/formatter/html.rb:92:in `show_in_browser'
  from ../lib/ruby/gems/2.0.0/gems/metric_fu-4.11.2/lib/metric_fu/formatter/html.rb:36:in `display_results'
bf4 commented 9 years ago

See https://github.com/metricfu/metric_fu/issues/236#issuecomment-63257566 where I need to fix the docs, but you should be able to fix this by adding

ENV['CC_BUILD_ARTIFACTS']=tmp/metric_fu to your .metrics or by setting the env outside of metric_fu. This needs to be documented.

bf4 commented 9 years ago

wanna make a PR?