-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
If no destination is provided when calling tc.downloadTool(), this function defaults to <tempDir>/<uuidv4>. This creates a destination file that doesn't have any file extension, which can apparently cause a subsequent call to tc.extractZip() to fail, with an error like the following:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath 'C:\actions-runner\_work\_temp\0f5cb3c0-ca78-43d2-9bf3-19b379b1f416' -DestinationPath 'C:\actions-runner\_work\_temp\882ce538-f7ae-45ef-adc9-32c2ee3cd5e1' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\actions-runner\_work\_temp\0f5cb3c0-ca78-43d2-9bf3-19b379b1f416', 'C:\actions-runner\_work\_temp\882ce538-f7ae-45ef-adc9-32c2ee3cd5e1', $true) }"
Expand-Archive : is not a supported archive file format. .zip is the only supported archive file format.
Expected behavior
After downloading a proper zip-file with tc.downloadTool(), tc.extractZip() should run without any errors.
Either:
tc.downloadTool()should default to a destination file that has the same file extension as provided in the givenurltc.extractZip()should add a.zipextension if necessary- Both of the above
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working