Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable To Extract GNU Tar With Overwrite false #160

Open
freshleafmedia opened this issue Mar 3, 2021 · 0 comments
Open

Unable To Extract GNU Tar With Overwrite false #160

freshleafmedia opened this issue Mar 3, 2021 · 0 comments

Comments

@freshleafmedia
Copy link

When attempting to extract a TAR archive using GNU Tar v1.30 when not overwriting an exception is raised:

$zippy = Zippy::load();
$archive = $zippy->open($archiveFilename);
$archive->extract(sys_get_temp_dir());
Alchemy\Zippy\Exception\RuntimeException
Unable to execute the following command '/usr/bin/tar' '-k' '--extract' '--file=/tmp/batch24e617b535.tar.gz' '--overwrite' '--gzip' '--directory' '/tmp' './14d2b6beb1.json' {output: /usr/bin/tar: '--overwrite' cannot be used with '--keep-old-files'
Try '/usr/bin/tar --help' or '/usr/bin/tar --usage' for more information.

I believe the problem stems from the default options for GNU Tar including --overwrite which conflicts with -k (or --keep-old-files) which is added by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant