exa
exa copied to clipboard
exa does not read TZ in 0.10.1
It seems to me the issue from #453 (not reading the TZ
variable) reoccurred. If not, please tell me if/what I can do.
Somehow this is doubly weird, as the fallback /etc/localtime
does exist. See for yourself:
pars@artus ~/text_zeug (master)> exa -lahF
Unable to determine time zone: No such file or directory (os error 2)
Permissions Size User Date Modified Name
drwxr-xr-x - pars 19 Mar 14:19 .git/
.rw-r--r-- 0 pars 19 Mar 14:19 .git-blame-ignore-revs
...
omitted
...
pars@artus ~/text_zeug (master)> echo $TZ
Europe/Berlin
pars@artus ~/text_zeug (master)> exa --version
exa - list files on the command-line
v0.10.1 [+git]
https://the.exa.website/
pars@artus ~> exa -lahF /etc/localtime
Unable to determine time zone: No such file or directory (os error 2)
Permissions Size User Date Modified Name
lrwxrwxrwx 27 root 22 Mar 07:44 /etc/localtime -> /etc/zoneinfo/Europe/Berlin
OS: NixOS 21.11, installed exa
through cargo
Configuration can be found at configs, machine is artus
.
Will be fixed by #867, probably. Do you have access to /usr/share/zoneinfo/Europe/Berlin
?
there's just bin
in /usr
Ah sorry I misread, on your machine /etc/localtime -> /etc/zoneinfo/Europe/Berlin
, so exa needs to access /etc/zoneinfo
, not /usr/share/zoneinfo
.
Well, it's like that:
lrwxrwxrwx 20 root 22 Mar 07:44 zoneinfo -> /etc/static/zoneinfo/
and
.r--r--r-- 2.3k root 1 Jan 1970 /etc/zoneinfo/Europe/Berlin
but I can totally just cat
/access them, no root
required.
Ah well yeah, the reason is very simple: exa reads TZ
and if it’s a relative path, it checks only in /usr/share/zoneinfo/
. Your problem can be fixed temporarily either by setting TZ
to an absolute path, or unsetting it so that it fallbacks on /etc/localtime
. And my PR will definitely fix that for good.
Unsetting it would degrade usability of other tools -- would setting it to an absolute path have downsides?
I don’t think so, it seems to be well supported by both glibc and musl, but I never used this feature, so I guess you should try and see if it causes any problem.
Closing this, since exa is unmaintained (see https://github.com/ogham/exa/issues/1243), and this has (finally :tada:) fixed in the active fork eza!