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

Expand-Archive: is not a supported archive file format. .zip is the only supported archive file format. #79

Closed
itsyoboieltr opened this issue May 1, 2024 · 9 comments · Fixed by #80
Labels
bug Something isn't working

Comments

@itsyoboieltr
Copy link

Using the action on a self-hosted windows runner, I get the following error:

Downloading a new version of Bun: https://bun.sh/download/latest/win32/x64?avx2=true&profile=false
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\...\actions-runner\_work\_temp\0bb06b9b-3ec9-438b-9df3-9f6b8f3d6db0' -DestinationPath 'C:\Users\...\actions-runner\_work\_temp\78124392-7335-40f5-bee0-b840781ccc98' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\Users\...\actions-runner\_work\_temp\0bb06b9b-3ec9-438b-9df3-9f6b8f3d6db0', 'C:\Users\...\actions-runner\_work\_temp\78124392-7335-40f5-bee0-b840781ccc98', $true) }"
Expand-Archive :  is not a supported archive file format. .zip is the only supported archive file format.
At line:1 char:210
+ ...  Ignore)) { Expand-Archive -LiteralPath 'C:\Users\...\actio ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:String) [Expand-Archive], IOException
    + FullyQualifiedErrorId : NotSupportedArchiveFileExtension,Expand-Archive

The problem seems to be that the action is using powershell 1.0, which does not support expanding the archive, even though I have powershell 7 installed, which should support it.

@xhyrom
Copy link
Collaborator

xhyrom commented May 4, 2024

what's the version of windows on your runner?

@itsyoboieltr
Copy link
Author

what's the version of windows on your runner?

Microsoft Windows NT 10.0.17763.0 x64

@xhyrom
Copy link
Collaborator

xhyrom commented May 4, 2024

Hmmm, that is version 1809 so it should work fine. Can you try running the powershell -c "irm bun.sh/install.ps1|iex" instead of using setup-bun and see if it happens (it should fail)?

@itsyoboieltr
Copy link
Author

Hmmm, that is version 1809 so it should work fine. Can you try running the powershell -c "irm bun.sh/install.ps1|iex" instead of using setup-bun and see if it happens (it should fail)?

It worked :) it installed bun successfully

@xhyrom
Copy link
Collaborator

xhyrom commented May 4, 2024

So it's something with the setup-bun action, i'll investigate, thanks for report!

@xhyrom xhyrom added the bug Something isn't working label May 4, 2024
@itsyoboieltr
Copy link
Author

So it's something with the setup-bun action, i'll investigate, thanks for report!

Thank you!

@xhyrom
Copy link
Collaborator

xhyrom commented May 8, 2024

Seems like there's something with

const extractedZipPath = await extractZip(zipPath);
and https://github.com/actions/toolkit/blob/ae38557bb0dba824cdda26ce787bd6b66cf07a83/packages/io/src/io.ts#L155-L254 in @actions/io

Related issue?: actions/toolkit#1179

xhyrom added a commit that referenced this issue May 8, 2024
@xhyrom
Copy link
Collaborator

xhyrom commented May 8, 2024

Hey, it's harder for me to test this since i don't have windows server. Can you please try the dev version of setup-bun? Put oven-sh/setup-bun@dev into uses

@itsyoboieltr
Copy link
Author

Hey, it's harder for me to test this since i don't have windows server. Can you please try the dev version of setup-bun? Put oven-sh/setup-bun@dev into uses

it works now! Thank you for the quick fix!

xhyrom added a commit that referenced this issue Jun 21, 2024
* feat: add input bun-version-file (#76)

* feat: add input for bun-version-file

* docs: update example bun version file

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* refactor: reduce read from file code

* [autofix.ci] apply automated fixes

* feat: read from all known files if not specified

* [autofix.ci] apply automated fixes

* fix: just continue if file doesnt exist

* [autofix.ci] apply automated fixes

* fix: return output if found version

* [autofix.ci] apply automated fixes

* fix: make whitespace in .tool-versions optional

* [autofix.ci] apply automated fixes

* log loglog

* [autofix.ci] apply automated fixes

* log log log

* [autofix.ci] apply automated fixes

* better warnings, fix ci failing

* [autofix.ci] apply automated fixes

* feat: log obtained version

* [autofix.ci] apply automated fixes

* build: bump version

* [autofix.ci] apply automated fixes

* fix: add .zip extension if it's not present

Workaround for actions/toolkit#1179

Fixes #79

* [autofix.ci] apply automated fixes

* docs: add comment for easier understanding

* ci: more readable version

* ci: match name

* docs: add package.json and .tool-versions to bun-version-file examples

* ci: add cache test

* ci: install another pkg for cache test

* ci: install more pkgs for cache test

* ci: block all trusted deps in cache test

* ci: more deps for cache test

* ci: cache test should cache

* refactor: dont try all files if not defined

* [autofix.ci] apply automated fixes

* ci: remove cache test

* feat: support .bunrc

* [autofix.ci] apply automated fixes

* refactor: .bun-version instead .bunrc

* [autofix.ci] apply automated fixes

* feat: add bun paths and url to output

Fixes #81

* [autofix.ci] apply automated fixes

* ci: test for .bun-version

* feat: make .bun-version as default in bun-version-file

* ci: remove cache before test

* ci: remove cache before test

* ci: remove cache before test

* ci: remove cache before test

---------

Co-authored-by: Ade Hery Shopyan <51158020+adeherysh@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
vladfrangu referenced this issue in apify/crawlee Jun 24, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [oven-sh/setup-bun](https://togithub.com/oven-sh/setup-bun) | action |
major | `v1` -> `v2` |

---

### Release Notes

<details>
<summary>oven-sh/setup-bun (oven-sh/setup-bun)</summary>

### [`v2`](https://togithub.com/oven-sh/setup-bun/releases/tag/v2)

[Compare Source](https://togithub.com/oven-sh/setup-bun/compare/v1...v2)

`oven-sh/setup-bun` is the github action for setting up Bun.

This release introduces support for the `bun-version-file` option, fixes
[https://github.com/oven-sh/setup-bun/issues/79](https://togithub.com/oven-sh/setup-bun/issues/79),
and adds bun paths & urls to the output
([https://github.com/oven-sh/setup-bun/issues/81](https://togithub.com/oven-sh/setup-bun/issues/81))

For more information, see
[https://github.com/oven-sh/setup-bun/pull/80](https://togithub.com/oven-sh/setup-bun/pull/80)
by [@&#8203;xHyroM](https://togithub.com/xHyroM) 🎉

**Full Changelog**: oven-sh/setup-bun@v1...v2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/apify/crawlee).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjQxMy4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
thm-automation bot referenced this issue in theoremlp/prettier-standalone Jun 24, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [oven-sh/setup-bun](https://togithub.com/oven-sh/setup-bun) | action | major | `v1` -> `v2` |

---

### Release Notes

<details>
<summary>oven-sh/setup-bun (oven-sh/setup-bun)</summary>

### [`v2`](https://togithub.com/oven-sh/setup-bun/releases/tag/v2)

[Compare Source](https://togithub.com/oven-sh/setup-bun/compare/v1...v2)

`oven-sh/setup-bun` is the github action for setting up Bun.

This release introduces support for the `bun-version-file` option, fixes [https://github.com/oven-sh/setup-bun/issues/79](https://togithub.com/oven-sh/setup-bun/issues/79), and adds bun paths & urls to the output ([https://github.com/oven-sh/setup-bun/issues/81](https://togithub.com/oven-sh/setup-bun/issues/81))

For more information, see [https://github.com/oven-sh/setup-bun/pull/76](https://togithub.com/oven-sh/setup-bun/pull/76) by [@&#8203;adeherysh](https://togithub.com/adeherysh) and [https://github.com/oven-sh/setup-bun/pull/80](https://togithub.com/oven-sh/setup-bun/pull/80) by [@&#8203;xHyroM](https://togithub.com/xHyroM) 🎉

**Full Changelog**: oven-sh/setup-bun@v1...v2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday after 9am before 5pm" in timezone America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQxNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
fbjork referenced this issue in grafbase/grafbase Jun 25, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [oven-sh/setup-bun](https://togithub.com/oven-sh/setup-bun) | action |
major | `v1` -> `v2` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>oven-sh/setup-bun (oven-sh/setup-bun)</summary>

### [`v2`](https://togithub.com/oven-sh/setup-bun/releases/tag/v2)

[Compare Source](https://togithub.com/oven-sh/setup-bun/compare/v1...v2)

`oven-sh/setup-bun` is the github action for setting up Bun.

This release introduces support for the `bun-version-file` option, fixes
[https://github.com/oven-sh/setup-bun/issues/79](https://togithub.com/oven-sh/setup-bun/issues/79),
and adds bun paths & urls to the output
([https://github.com/oven-sh/setup-bun/issues/81](https://togithub.com/oven-sh/setup-bun/issues/81))

For more information, see
[https://github.com/oven-sh/setup-bun/pull/80](https://togithub.com/oven-sh/setup-bun/pull/80)
by [@&#8203;xHyroM](https://togithub.com/xHyroM) 🎉

**Full Changelog**: oven-sh/setup-bun@v1...v2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/grafbase/grafbase).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjQxMy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
kodiakhq bot referenced this issue in mheob/config Jul 12, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [oven-sh/setup-bun](https://togithub.com/oven-sh/setup-bun) | action | major | `v1` -> `v2` |

---

### Release Notes

<details>
<summary>oven-sh/setup-bun (oven-sh/setup-bun)</summary>

### [`v2`](https://togithub.com/oven-sh/setup-bun/releases/tag/v2)

[Compare Source](https://togithub.com/oven-sh/setup-bun/compare/v1...v2)

`oven-sh/setup-bun` is the github action for setting up Bun.

This release introduces support for the `bun-version-file` option, fixes [https://github.com/oven-sh/setup-bun/issues/79](https://togithub.com/oven-sh/setup-bun/issues/79), and adds bun paths & urls to the output ([https://github.com/oven-sh/setup-bun/issues/81](https://togithub.com/oven-sh/setup-bun/issues/81))

For more information, see [https://github.com/oven-sh/setup-bun/pull/76](https://togithub.com/oven-sh/setup-bun/pull/76) by [@&#8203;adeherysh](https://togithub.com/adeherysh) and [https://github.com/oven-sh/setup-bun/pull/80](https://togithub.com/oven-sh/setup-bun/pull/80) by [@&#8203;xHyroM](https://togithub.com/xHyroM) 🎉

**Full Changelog**: oven-sh/setup-bun@v1...v2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Wednesday" in timezone Europe/Berlin, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/mheob/config).
fbjork referenced this issue in grafbase/grafbase Sep 23, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [oven-sh/setup-bun](https://redirect.github.com/oven-sh/setup-bun) |
action | major | `v1` -> `v2` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>oven-sh/setup-bun (oven-sh/setup-bun)</summary>

###
[`v2`](https://redirect.github.com/oven-sh/setup-bun/releases/tag/v2)

[Compare
Source](https://redirect.github.com/oven-sh/setup-bun/compare/v1...v2)

`oven-sh/setup-bun` is the github action for setting up Bun.

This release introduces support for the `bun-version-file` option, fixes
[https://github.com/oven-sh/setup-bun/issues/79](https://redirect.github.com/oven-sh/setup-bun/issues/79),
and adds bun paths & urls to the output
([https://github.com/oven-sh/setup-bun/issues/81](https://redirect.github.com/oven-sh/setup-bun/issues/81))

For more information, see
[https://github.com/oven-sh/setup-bun/pull/76](https://redirect.github.com/oven-sh/setup-bun/pull/76)
by [@&#8203;adeherysh](https://redirect.github.com/adeherysh) and
[https://github.com/oven-sh/setup-bun/pull/80](https://redirect.github.com/oven-sh/setup-bun/pull/80)
by [@&#8203;xHyroM](https://redirect.github.com/xHyroM) 🎉

**Full Changelog**: oven-sh/setup-bun@v1...v2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/grafbase/grafbase).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants