Closed cpc-camarj closed 1 year ago
Windows tests that reproduce this issue would be ideal! I can work on testing on Windows if needed.
See #168. I read https://github.com/actions/toolkit/issues/1287 more carefully. I'm disinclined to add a workaround here for @actions/*
for a specific Windows self-hosted runner configuration. Especially for outdated versions. I don't know much about PowerShell but perhaps it would be possible to shim that command to do the renaming you want.
I looked into shimming, and it would be possible to workaround this problem with something like the following in a Powershell profile:
function Expand-Archive($path) {
if ( $path -NotMatch ".zip$" ){
Move-Item "$path" "${path}.zip"
powershell.exe -nop -c Expand-Archive "${path}.zip"
} else {
powershell -nop -c Expand-Archive $path
}
}
we ultimately decided to go ahead and install Powershell Core by default on all our self-hosted runners.
since my team has landed on a different solution, I'll close the PR.
This is a workaround to handle the problem described here: https://github.com/actions/toolkit/issues/1287