lib/appium_lib/driver.rb in appium_lib-0.18.2 vs lib/appium_lib/driver.rb in appium_lib-0.19.0

- old
+ new

@@ -66,14 +66,10 @@ update data, 'APP_PATH', 'APP_APK', 'APP_PACKAGE', 'APP_ACTIVITY', 'APP_WAIT_ACTIVITY', 'DEVICE' - # Ensure app path is absolute - ENV['APP_PATH'] = File.expand_path ENV['APP_PATH'] if ENV['APP_PATH'] && - !ENV['APP_PATH'].empty? - # device is not case sensitive ENV['DEVICE'] = ENV['DEVICE'].strip.downcase if !ENV['DEVICE'].nil? if ! %w(ios android selendroid).include? ENV['DEVICE'] raise %(DEVICE="#{ENV['DEVICE']}" must be ios, android, or selendroid.) @@ -427,10 +423,10 @@ def absolute_app_path raise 'APP_PATH not set!' if @app_path.nil? || @app_path.empty? # Sauce storage API. http://saucelabs.com/docs/rest#storage return @app_path if @app_path.start_with? 'sauce-storage:' return @app_path if @app_path.match(/^http/) # public URL for Sauce - if @app_path.match(/^\//) # absolute file path + if @app_path.match(/^(\/|[a-zA-Z]:)/) # absolute file path raise "App doesn't exist. #{@app_path}" unless File.exist? @app_path return @app_path end # if it doesn't contain a slash then it's a bundle id \ No newline at end of file