Skip to content

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

Closed
Ecco wants to merge 1 commit intoactions:masterfrom
Ecco:fix-tool-cache-tar-path-on-windows
Closed

tool-cache: Work around a weird GNU Tar behavior on Windows#180
Ecco wants to merge 1 commit intoactions:masterfrom
Ecco:fix-tool-cache-tar-path-on-windows

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.

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
Contributor

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