-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Windows/ Powershell error: Expand-Archive : is not a supported archive file format. .zip is the only supported archive file format. #91
Comments
@irnbrux this looks like identical to this problem: #74 |
Hi, it is identical to #74 indeed. The cause is to use the expand cmdlet on a file that does not have a .zip file extension. When you rename the file first (as part of the action) to have a .zip file extension, it will work I guess. At least this is the behavior if I invoke the commands manually. Cheers |
@irnbrux this should be the root cause: actions/toolkit#1179 |
@irnbrux you may try this version and report back: |
So with fix91 I can see the zip gets extracted correctly, however the process just keeps running after extraction and never completes. I need to investigate further:
There is nothing more after the last line ... |
OK, the cmake extract does now work, however we get the same error for the ninja download as well I think: useCloudCache:false
::endgroup:: |
@irnbrux thank you for reporting back! Now the same manipulation is applied to the |
Hi @lukka that works for me now for cmake and ninja under Windows 11. Cheers |
I also hit this issue on a self-hosted windows runner. After installing powershell 7 with
I still had the same issue (apparently the newer version doesn't replace the old powershell, it's just installed alongside), but switching to |
Fixed in |
Hi,
i get the following error using
uses: lukka/[email protected]
with:
useLocalCache: true
useCloudCache: false
cmakeVersion: "~3.27.0"
ninjaVersion: latest
log:
useCloudCache:false
useLocalCache:true
user defined cmake version:~3.27.0
user defined ninja version:latest
cmake version:~3.27.0
ninja version:latest
::group::Computing cache key from the downloads' URLs
Cache key: '507572093'.
Local install root: 'C:\Users\User.cache\act\8c275a1a4fda57b3\tmp\507572093''.
::endgroup::
::group::Restoring from local GitHub runner cache using key '507572093'
Local cache miss.
::endgroup::
::group::Downloading and extracting CMake
[command]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:\Users\User.cache\act\8c275a1a4fda57b3\tmp\ad76d5b6-c455-4ab6-810f-4a4c64dce49b' -DestinationPath 'C:\Users\User.cache\act\8c275a1a4fda57b3\tmp\507572093' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\Users\User.cache\act\8c275a1a4fda57b3\tmp\ad76d5b6-c455-4ab6-810f-4a4c64dce49b', 'C:\Users\User.cache\act\8c275a1a4fda57b3\tmp\507572093', $true) }"
Expand-Archive : is not a supported archive file format. .zip is the only supported archive file format.
At line:1 char:210
::endgroup::
Error: The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1
at ExecState._setResult (C:\Users\User.cache\act\8c275a1a4fda57b3\act\actions\[email protected]\dist\index.js:5801:25)
at ExecState.CheckComplete (C:\Users\User.cache\act\8c275a1a4fda57b3\act\actions\[email protected]\dist\index.js:5784:18)
at ChildProcess. (C:\Users\User.cache\act\8c275a1a4fda57b3\act\actions\[email protected]\dist\index.js:5678:27)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)
::error::get-cmake action execution failed: 'Error: The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1'
The text was updated successfully, but these errors were encountered: