Conversation
| @@ -268,96 +268,88 @@ describe('@actions/tool-cache', function() { | |||
| await io.rmRF(tempDir) | |||
There was a problem hiding this comment.
i had to recreate test.tar.gz with the option --format pax otherwise bsdtar doesnt preserve UTF file names correctly
There was a problem hiding this comment.
i added a README.txt to the archive for future reference
| } | ||
|
|
||
| await io.mkdirP(tempDir) | ||
| it('extract .tar.gz', async () => { |
There was a problem hiding this comment.
no changes here, just eliminated the else condition and de-indented
| let destArg = dest | ||
| if (IS_WINDOWS && isGnuTar) { | ||
| args.push('--force-local') | ||
| destArg = dest.replace(/\\/g, '/') |
There was a problem hiding this comment.
Both destArg and file need the \ replacement
There was a problem hiding this comment.
I can add for file too, but when i tested file doesnt appear to be required
There was a problem hiding this comment.
i'll push this change, aesthetically it will look good for consistency
Co-Authored-By: Josh Gross <[email protected]>
|
Add a description for the PR ☝️ |
|
Other than description, LGTM |
| stderr: (data: Buffer) => (versionOutput += data.toString()) | ||
| } | ||
| }) | ||
| const isGnuTar = versionOutput.toUpperCase().includes('GNU TAR') |
There was a problem hiding this comment.
Consider debugging this so we can troubleshoot easier if for some reason this breaks. (Analyzing text output of a cli can be a little fragile)
There was a problem hiding this comment.
the output flows to the console too, so we're good wrt that aspect
Fixes extractTar on Windows by formatting the arguments different depending on whether BSD tar or GNU tar is being called.