setup-dart icon indicating copy to clipboard operation
setup-dart copied to clipboard

Installation fails on Windows 11

Open dnys1 opened this issue 1 year ago • 1 comments

When installing on Windows 11 (ARM64), I get the following error:

Installing the windows-arm64 Dart SDK version 3.3.0-174.3.beta from the beta (release) channel.
https://storage.googleapis.com/dart-archive/channels/beta/release/3.3.0-174.3.beta/sdk/dartsdk-windows-arm64-release.zip ...
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\c314cd0b-3c6[8](https://github.com/celest-dev/cloud/actions/runs/7372205470/job/20060311893?pr=166#step:3:9)-48f7-a571-b2ee052b271d' -DestinationPath 'C:\actions-runner\_work\_temp\28[9](https://github.com/celest-dev/cloud/actions/runs/7372205470/job/20060311893?pr=166#step:3:10)b3aa8-b730-4025-a328-c1359a33f75d' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\actions-runner\_work\_temp\c314cd0b-3c68-48f7-a571-b2ee052b271d', 'C:\actions-runner\_work\_temp\289b3aa8-b730-4025-a328-c1359a33f75d', $true) }"
Expand-Archive :  is not a supported archive file format. .zip is the only supported archive file format.
At line:1 char:2[10](https://github.com/celest-dev/cloud/actions/runs/7372205470/job/20060311893?pr=166#step:3:11)
+ ...  Ignore)) { Expand-Archive -LiteralPath 'C:\actions-runner\_work\_tem ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:String) [Expand-Archive], IOException
    + FullyQualifiedErrorId : NotSupportedArchiveFileExtension,Expand-Archive
 
Error: Error: The process 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1

dnys1 avatar Dec 31 '23 19:12 dnys1

Seems to be an issue in how @actions/tool-cache determines the destination path:

https://github.com/actions/toolkit/blob/5430c5d84832076372990c7c27f900878ff66dc9/packages/tool-cache/src/tool-cache.ts#L44

I've opened https://github.com/dart-lang/setup-dart/pull/119 to resolve this. Please let me know if this is better resolved in the tool-cache repo instead.

dnys1 avatar Dec 31 '23 20:12 dnys1

@devoncarew Thanks for taking care of the PR. Any chance we can have a new patch release 1.6.5 with this change?

ntkme avatar Jun 24 '24 20:06 ntkme

Yup! I'm planning on doing that today.

devoncarew avatar Jun 24 '24 20:06 devoncarew

The fix for this was released as v1.6.5 (and the v1 tag updated to point to v1.6.5).

devoncarew avatar Jun 24 '24 21:06 devoncarew