ugexe / zef

Raku Module Management
Artistic License 2.0
207 stars 45 forks source link

Extract zip files if tar command is determined to be bsdtar #508

Closed ugexe closed 1 year ago

ugexe commented 1 year ago

Originally Windows had native support for extracting zip files, but not tar files. This made zip files somewhat attractive in the early days since it meant Windows users could install your modules without having to figure out how to install tar for .tar.gz files. This was done by invoking a small powershell script. However, modern Windows distributions come with bsdtar which can extract zip files. While I've generally been against feature detection for the plugins that invoke commands, I'm more inclined to do so here as it means we can delete the last powershell script based plugin. Unfortunately gnutar does not extract zip files, so we have to keep the non powershell unzip plugin for now for gnutar users (most linux users).

This updates the tar plugin to detect if it is using bsdtar, and if so it adds .zip to its list of extensions it will accept. This also deletes the powershell unzip plugin since Windows comes with a bsdtar now.