Package: ranger
Version: 1.6.1-1
Severity: normal
Tags: upstream

Dear Maintainer,

A user in #debian brought to our attention that ranger seems to need PAGER
to be set. After some investigation, we worked out that:

* if PAGER is not set at all (so, export -n PAGER; ranger) everything is OK

* if PAGER is set to an executable (PAGER=less ranger) everything is OK

* if PAGER is set but empty (PAGER= ranger) then any commands using the pager
will fail:

$ PAGER= ranger
(then type «1?» to see a list of the keybindings)
Failed to run: ['', '/tmp/tmp2o1fnV']
[Errno 13] Permission denied

There are a few places where the check for a valid value of PAGER only checks
if PAGER is set and not if it is also a non-empty value:

rifle.py:330
  if 'PAGER' not in os.environ:

commands.py and actions.py (numerous places)
  pager = os.environ.get('PAGER', ranger.DEFAULT_PAGER)

It would be worth fixing ranger so that an empty PAGER does not cause it to
fail in a strange way; setting empty values to environment variables is
normally considered to be identical to removing them from the environment.

cheers
Stuart

PS other uses of os.environ should probably be checked too


-- System Information:
Debian Release: 8.0
  APT prefers testing-updates
  APT policy: (550, 'testing-updates'), (550, 'testing'), (60, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ranger depends on:
ii  python  2.7.8-3

Versions of packages ranger recommends:
ii  file            1:5.20-2
ii  python-chardet  2.3.0-1
ii  sudo            1.8.10p3-1+deb8u1
ii  w3m-img         0.5.3-19

Versions of packages ranger suggests:
pn  atool          <none>
pn  caca-utils     <none>
pn  highlight      <none>
ii  less           458-3
ii  poppler-utils  0.26.5-2
ii  w3m            0.5.3-19

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to