ckolivas / lrzip

Long Range Zip
http://lrzip.kolivas.org
GNU General Public License v2.0
619 stars 76 forks source link

If `which` is unavailable in the $PATH lrztar fails with a confusing error message #162

Closed boreq closed 3 years ago

boreq commented 4 years ago

If which is unavailable in the $PATH then lrztar fails with a confusing error message:

lrztar: no tar in your path

This is caused by this line assuming that which will always be available. This is not the case in some cases, for example in archlinux/base Docker image and caused some confusion before I realized what is going on.

The simplest fix would most likely be to check if which can be executed just before those checks, or just trying to run those programs directly for example by executing tar --version and so on.

pete4abw commented 4 years ago

Perhaps, just use tar -I | --use-compress-program= lrzip ... This works rather well. Also you can embed any options you want or use an lrzip.conf file to use various options. lrztar has some issues with some options and as a shell file is pretty complex.

ckolivas commented 3 years ago

Fixed in git master.