1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Silence output message in Windows when pager doesn't exist.

In Windows, if `less` (or another pager) isn't found by `where.exe` it outputs this info to stderr:

```
[1] pry(main)> 1
INFO: Could not find files for the given pattern(s).
=> 1
```

The `/Q` flag silences this message:

```
[1] pry(main)> 1
=> 1
```

Tested on Conemu, cmd and PowerShell.
This commit is contained in:
Silver Phoenix 2018-08-18 13:29:28 +01:00 committed by Kyrylo Silin
parent 3cb772e564
commit 42bfc92c52

View file

@ -139,7 +139,7 @@ class Pry::Pager
@system_pager = begin
pager_executable = default_pager.split(' ').first
if Pry::Helpers::BaseHelpers.windows? || Pry::Helpers::BaseHelpers.windows_ansi?
`where #{pager_executable}`
`where /Q #{pager_executable}`
else
`which #{pager_executable}`
end