wummel / patool

patool is a portable command line archive file manager
http://wummel.github.io/patool/
GNU General Public License v3.0
404 stars 68 forks source link

--force-local option for tar isn't supported in macOS #125

Closed tuanchoang closed 1 year ago

tuanchoang commented 1 year ago

(tested with macOS Ventura 13.4)

In macOS, the --force-local option is not supported with the BSD tar that's installed and used by default at /usr/bin/tar.

In add_tar_opts in patoolib/programs/tar.py, there needs to be a check where the --force-local option is only enabled if tar is GNU tar (ideal) or if sys.platform != "darwin" (not ideal cause there's a workaround, shown below)

Currently, the workaround for macOS is to install GNU tar from homebrew and then "replace" it:

brew install gnu-tar
echo "export PATH=\"/opt/homebrew/opt/gnu-tar/libexec/gnubin:$PATH\"" >> ~/.zshrc
exec zsh
wummel commented 1 year ago

A new version 1.14.0 of patool has been released on 25.10.2023. Therefore this bug will be closed. If you think this issue is not solved, please open a new issue.