Skip to content
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

Installation fails on Windows 11 #118

Closed
dnys1 opened this issue Dec 31, 2023 · 4 comments · Fixed by #119
Closed

Installation fails on Windows 11 #118

dnys1 opened this issue Dec 31, 2023 · 4 comments · Fixed by #119

Comments

@dnys1
Copy link
Contributor

dnys1 commented Dec 31, 2023

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 added a commit to dnys1/setup-dart that referenced this issue Dec 31, 2023
Fixes dart-lang#118

Ensures that downloads of the Dart SDK zip file carry the `.zip` extension so that subsequent calls to `Expand-Archive` on Windows succeed.

## Notes

- Uses Dart `3.3.0-16.0.dev`. The current version (`3.3.0-5.0.dev`) is not published so I kept it to the closest published version.
- The diff of `index.mjs` is quite large. I believe this is due to the version of Node I'm using (`20.7.0`). Happy to use a different version to keep the diff small, but wasn't sure which one is currently used.
dnys1 added a commit to dnys1/setup-dart that referenced this issue Dec 31, 2023
Fixes dart-lang#118

Ensures that downloads of the Dart SDK zip file carry the `.zip` extension so that subsequent calls to `Expand-Archive` on Windows succeed.

## Notes

- Uses Dart `3.3.0-16.0.dev`. The current version (`3.3.0-5.0.dev`) is not published so I kept it to the closest published version.
- The diff of `index.mjs` is quite large. I believe this is due to the version of Node I'm using (`20.7.0`). Happy to use a different version to keep the diff small, but wasn't sure which one is currently used.
@dnys1
Copy link
Contributor Author

dnys1 commented Dec 31, 2023

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 #119 to resolve this. Please let me know if this is better resolved in the tool-cache repo instead.

dnys1 added a commit to dnys1/setup-dart that referenced this issue May 1, 2024
Fixes dart-lang#118

Ensures that downloads of the Dart SDK zip file carry the `.zip` extension so that subsequent calls to `Expand-Archive` on Windows succeed.

## Notes

- The diff of `index.mjs` is quite large. I believe this is due to the version of Node I'm using (`20.7.0`). Happy to use a different version to keep the diff small, but wasn't sure which one is currently used. This could be noted in `package.json` to ensure alignment with external contributions.
dnys1 added a commit to dnys1/setup-dart that referenced this issue Jun 10, 2024
Fixes dart-lang#118

Ensures that downloads of the Dart SDK zip file carry the `.zip` extension so that subsequent calls to `Expand-Archive` on Windows succeed.

## Notes

- The diff of `index.mjs` is quite large. I believe this is due to the version of Node I'm using (`20.7.0`). Happy to use a different version to keep the diff small, but wasn't sure which one is currently used. This could be noted in `package.json` to ensure alignment with external contributions.
@ntkme
Copy link

ntkme commented Jun 24, 2024

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

@devoncarew
Copy link
Member

Yup! I'm planning on doing that today.

@devoncarew
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants