actions / actions/toolkit

tool-cache - support older PowerShell versions for unzipping

Open
#1,319 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

When using the extractZip method of the tool-cache on windows, it uses PowerShell to extract the archive.
WIth the PowerShell version 7 that is available on the GitHub hosted runners this works perfectly fine.
But if someone uses a self-hosted runner, chances are big that there is only PowerShell version 5 available.

With that old PowerShell version the extraction could also work, but only if the file literally ends with .zip.

It would be nice if the tool-cache method for unzipping would mitigate that situation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the tool-cache extractZip entry point and inspect how PowerShell is invoked for Windows archives. Reproduce the behavior with PowerShell 5 and an archive whose name does not end in .zip; done means extraction works there as well as on PowerShell 7.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.