Skip to content

Commit 4d98683

Browse files
authored
skip loading Pry.config.pager = false if users have .pryrc (#585)
1 parent 517f30d commit 4d98683

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/appium_lib/driver.rb

+5-2
Original file line numberDiff line numberDiff line change
@@ -775,5 +775,8 @@ def set_automation_name_if_nil
775775

776776
# Paging in Pry is annoying :q required to exit.
777777
# With pager disabled, the output is similar to IRB
778-
# Only set if Pry is defined.
779-
Pry.config.pager = false if defined?(Pry)
778+
# Only set if Pry is defined and there is no `.pryrc` files.
779+
if defined?(Pry) && !(File.exist?(Pry::HOME_RC_FILE) || File.exist?(Pry::LOCAL_RC_FILE))
780+
Appium::Logger.debug 'Pry.config.pager = false is set.'
781+
Pry.config.pager = false
782+
end

readme.md

+3
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,6 @@ gem install --no-rdoc --no-ri appium_lib
6969
```ruby
7070
Appium::Logger.level = Logger::INFO
7171
```
72+
73+
#### Load Pry
74+
`Pry.config.pager = false` is set if you have no `.pryrc` files and `Pry` is defined.

0 commit comments

Comments
 (0)