Method: PostRunner::FitFileStore#show_in_browser

Defined in:
lib/postrunner/FitFileStore.rb

#show_in_browser(html_file) ⇒ Object

Launch a web browser and show an HTML file.

Parameters:

  • file name of the HTML file to show



350
351
352
353
354
355
356
357
# File 'lib/postrunner/FitFileStore.rb', line 350

def show_in_browser(html_file)
  cmd = "#{ENV['BROWSER'] || 'firefox'} \"#{html_file}\" &"

  unless system(cmd)
    Log.fatal "Failed to execute the following shell command: #{$cmd}\n" +
              "#{$!}"
  end
end