Closed Nudin closed 4 years ago
Not entirely sure why since it works for me, but what it could be is that Highlight... http://www.andre-simon.de/doku/highlight/en/highlight.php ... isn't installed.
Could you do highlight --version
?
Expected result is something like highlight version 3.55
and a bunch of more text.
highlight version 3.55
Copyright (C) 2002-2020 Andre Simon <a dot simon at mailbox.org>
Argparser class
Copyright (C) 2006-2008 Antonio Diaz Diaz <ant_diaz at teleline.es>
Artistic Style Classes (3.1)
Copyright (C) 2006-2018 by Jim Pattee <jimp03 at email.com>
Copyright (C) 1998-2002 by Tal Davidson
Diluculum Lua wrapper (1.0)
Copyright (C) 2005-2013 by Leandro Motta Barros
xterm 256 color matching functions
Copyright (C) 2006 Wolfgang Frisch <wf at frexx.de>
This software is released under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Next hypothesis: Maybe highlight
fails for whatever reason on your system.
Can you see if either of these two commands fail? I'm unsure which file it actually tries to highlight...
highlight --out-format=esc -i /home/michi/.cache/yay/moar/src/moar-0.9.18/m/pager_test.go
highlight --out-format=esc -i /usr/lib/go/src/testing/testing.go
Both work. I suspected firejail
could be the reason, so I disabled it for highlight
but that makes no difference.
So the facts are:
I see two options:
highlight
stderr
output to the error object. That would probably produce an error message that's a lot more informative. Somewhere around here: https://github.com/walles/moar/blob/0fc6ee65f5387d9ce4403f2a09ba6bcd3d7b3245/m/reader.go#L69-L70What would you prefer?
@Nudin, in 9a81e5ee62c8e413e052c0ebab1f1511ee547fe5 I have now implemented 1, so if you run the same tests on latest master you should get to know what highlight
's problem is.
Can you try this and post the output here?
git clone git@github.com:walles/moar.git
cd moar
./test.sh
Sorry for the troubles. Your patch revealed that the issue was bzip crashed:
reader_test.go:137: Error reading file <../sample-files/compressed.txt.bz2>: Error: invalid /etc/hosts file
Error: proc 88517 cannot sync with peer: unexpected EOF
Peer 88518 unexpectedly exited with status 1: exit status 1
After debugging this further it turned out as a bug in firejail. I am sorry for wasting your time hunting an issue that isn't in your code.
NP, I wanted to fix that error message anyway.
Thanks for your troubleshooting @Nudin!
When trying to install in Arch via AUR the tests (
go test github.com/walles/moar/m
) fail: