Repository navigation
Fix tar error in Git Bash on Windows - #61
Merged
Merged
Conversation
GNU tar in Git Bash treats C:\... archive path as remote host and fails with "Cannot connect to C: resolve failed". Run tar via execFile inside the temporary directory so no absolute path reaches tar arguments. Also remove the temporary directory when extraction fails, so failed downloads do not accumulate orphaned directories in tmpdir. Fixes ai#53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows with Git Bash multiocular crashes when it unpacks a package
Fix is to run tar inside the temporary directory and pass the archive as a relative path (
package.tgz). This waytararguments contain no absolute paths. Also useexecFileinstead ofexec, so there is no shell and no quoting issues.Other options I checked:
--force-localflag: only GNU tar has it, breaks BSD tar on macOS.More at #53
Fixes #53