Skip to content

Commit d55c6fa

Browse files
Fix device and rake uninstall
1 parent 8c704ee commit d55c6fa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Rakefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,8 @@ end
9090
desc 'Uninstall gem'
9191
task :uninstall do
9292
cmd = "gem uninstall -aIx #{repo_name}"
93-
puts cmd
9493
# rescue on gem not installed error.
95-
begin; `cmd`; rescue; end
94+
begin; sh "#{cmd}"; rescue; end
9695
end
9796

9897
desc 'Install gem'

lib/appium_lib/driver.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ def update data, *args
7474
!ENV['APP_PATH'].empty?
7575

7676
# device is not case sensitive
77-
ENV['DEVICE'] = ENV['DEVICE'].strip.downcase if ENV['DEVICE']
77+
ENV['DEVICE'] = ENV['DEVICE'].strip.downcase if !ENV['DEVICE'].nil?
7878
if ! %w(ios android selendroid).include? ENV['DEVICE']
79-
raise 'DEVICE must be ios, android, or selendroid'
79+
raise %(DEVICE="#{ENV['DEVICE']}" must be ios, android,
80+
or selendroid.)
8081
end
8182
end
8283

0 commit comments

Comments
 (0)