Skip to content

Commit 69f2058

Browse files
Merge pull request #119 from misttar/feature/appium_ruby_console_on_windows
Fix to enable appium ruby console (arc) on windows;
2 parents f529113 + 55ab536 commit 69f2058

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/appium_lib/driver.rb

+1-8
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ def update data, *args
6868
'APP_ACTIVITY', 'APP_WAIT_ACTIVITY',
6969
'DEVICE'
7070

71-
# Ensure app path is absolute
72-
ENV['APP_PATH'] = File.expand_path ENV['APP_PATH'] if ENV['APP_PATH'] &&
73-
!ENV['APP_PATH'].empty?
74-
7571
# device is not case sensitive
7672
ENV['DEVICE'] = ENV['DEVICE'].strip.downcase if !ENV['DEVICE'].nil?
7773
if ! %w(ios android selendroid).include? ENV['DEVICE']
@@ -429,14 +425,11 @@ def absolute_app_path
429425
# Sauce storage API. http://saucelabs.com/docs/rest#storage
430426
return @app_path if @app_path.start_with? 'sauce-storage:'
431427
return @app_path if @app_path.match(/^http/) # public URL for Sauce
432-
if @app_path.match(/^\//) # absolute file path
428+
if @app_path.match(/^(\/|[a-zA-Z]:)/) # absolute file path
433429
raise "App doesn't exist. #{@app_path}" unless File.exist? @app_path
434430
return @app_path
435431
end
436432

437-
# if it starts with [A-Z]:\ then it's a windows absolute path
438-
return @app_path if @app_path.match(/^[a-zA-Z]:\\/)
439-
440433
# if it doesn't contain a slash then it's a bundle id
441434
return @app_path unless @app_path.match(/[\/\\]/)
442435

0 commit comments

Comments
 (0)