Skip to content

Commit

Permalink
Disable gnu tar remote file feature
Browse files Browse the repository at this point in the history
GNU tar will try to download remote files if they contain a colon.
This avoids that issue by using --force-local to disable that
behavior.
  • Loading branch information
ugexe committed Jan 7, 2025
1 parent 7dc3492 commit 77a5de4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Zef/Service/Shell/tar.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class Zef::Service::Shell::tar does Extractor {
react {
my $cwd := $archive-file.parent;
my $ENV := %*ENV;
my $proc = Zef::zrun-async('tar', '-zxvf', $archive-file.basename, '-C', $extract-to.relative($cwd));
my $proc = Zef::zrun-async('tar', '-zxvf', '--force-local', $archive-file.basename, '-C', $extract-to.relative($cwd));
$stdout.emit("Command: {$proc.command}");
whenever $proc.stdout(:bin) { }
whenever $proc.stderr(:bin) { }
Expand All @@ -141,7 +141,7 @@ class Zef::Service::Shell::tar does Extractor {
react {
my $cwd := $archive-file.parent;
my $ENV := %*ENV;
my $proc = Zef::zrun-async('tar', '-zt', '-f', $archive-file.basename);
my $proc = Zef::zrun-async('tar', '-zt', '--force-local', '-f', $archive-file.basename);
$stdout.emit("Command: {$proc.command}");
whenever $proc.stdout(:bin) { $output.append($_) }
whenever $proc.stderr(:bin) { }
Expand Down

0 comments on commit 77a5de4

Please sign in to comment.