bin/xultest in xultestrunner-0.2.8 vs bin/xultest in xultestrunner-0.2.9

- old
+ new

@@ -1,13 +1,13 @@ #!/usr/bin/env ruby require 'pathname' -firefox_location = [`which firefox-bin`.chomp, `which firefox`.chomp].detect do |loc| - !loc.length.zero? -end +args = ARGV.dup -raise "Could not find `firefox-bin` or `firefox` in your path. Please rectify this and try again." unless firefox_location +gecko_runtime_search = (ENV['USE_XULRUNNER'] || args.delete("-xulrunner")) ? %w[xulrunner-bin xulrunner] : %w[firefox-bin firefox] +runtime = gecko_runtime_search.detect { |runtime_cmd| !`which #{runtime_cmd}`.strip.length.zero? } +raise("Could not find '#{gecko_runtime_search.join(", ")}' in your path. Please rectify this and try again.") unless runtime + xulapp_ini_path = (Pathname(__FILE__).parent.parent + "xulapp/application.ini").expand_path -puts("") -exec(firefox_location, *["-app", xulapp_ini_path, *ARGV]) +exec(runtime, *["-app", xulapp_ini_path, *args]) \ No newline at end of file