Open haarg opened 9 years ago
Maybe relying on this is a good idea:
C:\Windows\System32>corelist Archive::Tar
Data for 2015-02-14
Archive::Tar was first released with perl v5.9.3
Does this work for you?
diff --git a/lib/App/cpanminus/script.pm b/lib/App/cpanminus/script.pm
index 997092a..d48c185 100644
--- a/lib/App/cpanminus/script.pm
+++ b/lib/App/cpanminus/script.pm
@@ -16,7 +16,7 @@ use String::ShellQuote ();
use version ();
use constant WIN32 => $^O eq 'MSWin32';
-use constant BAD_TAR => ($^O eq 'solaris' || $^O eq 'hpux');
+use constant BAD_TAR => (WIN32 || $^O eq 'solaris' || $^O eq 'hpux');
use constant CAN_SYMLINK => eval { symlink("", ""); 1 };
our $VERSION = $App::cpanminus::VERSION;
Hm, nevermind it already does WIN32 check in maybe_bad_tar. There's some missing combination that it cannot detect when there is gzip/bzip.
Does C:\Perl\site\lib\App\cpanminus.pm: 1.7004 have that code already? Maybe my cpanm is too old.
Yes, 1.7004 has that already. But it only uses it to check if tar has supported uncompression options. But nevertheless upgrading is always recommended.
The options are:
/usr/bin
)I think flipping the order is the simplest.
Another option is to run tar --version and reject it if it is the Cygwin version and not running under Cygwin. cpanm already does something along these lines for other tar versions.
I'm not yet advocating for a specific solution to this though. Still need to give it more thought.
If you have a Win32 system that includes cygwin in its PATH, cpanm will find cygwin's tar.exe and use it for extracting tarballs. The filesystem semantics it uses don't match how Windows handles them, leading to things like prompting for every file if you try to delete the build files through the GUI.
It might make sense to avoid using Cygwin tools unless
$^O eq 'cygwin'
.Example
cpanm -v
output:Example
tar --version
output from cygwin: