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

tool-cache: Work around a weird GNU Tar behavior on Windows #180

Closed
wants to merge 1 commit into from
Closed

tool-cache: Work around a weird GNU Tar behavior on Windows #180

wants to merge 1 commit into from

Conversation

Ecco
Copy link

@Ecco Ecco commented Oct 3, 2019

For some reason GNU Tar insists on parsing the destination path using an Unix path delimiter (/), even on windows where the path delimiter is \.

This patch simply rewrites \ to / in the destination path.

@@ -200,6 +200,10 @@ export async function extractTar(
}

dest = dest || (await _createExtractFolder(dest))
if (IS_WINDOWS) {
// For some reason, GNU Tar on Windows expects paths to be slash-separated even though this is not the standard Windows path delimiter
dest = dest.replace(/\\/g, '/')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I proposed an alternate solution for #165 which will eliminate the need for this.

Let's close on the other PR first before proceeding with this PR.

Copy link
Contributor

@ericsciple ericsciple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment

@joshmgross
Copy link
Member

Fixed by #264

@joshmgross joshmgross closed this Dec 26, 2019
@Ecco Ecco deleted the fix-tool-cache-tar-path-on-windows branch December 27, 2019 02:42
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

Successfully merging this pull request may close these issues.

4 participants