tool cache extractZip not working for Linux
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
After downloading a zip file from web, while trying to unzip it, the tool cache's extractZip works perfectly fine in Windows, but not in Linux OS. Below is the error:
/usr/bin/unzip -o -q file.zip
unzip: cannot find or open file.zip, file.zip.zip or file.zip.ZIP.
/workspaces/project/node_modules/@actions/exec/lib/toolrunner.js:592
error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
^
Error: The process '/usr/bin/unzip' failed with exit code 9
Examining the above command which ran, /usr/bin/unzip -o -q file.zip; I tried to manually run /usr/bin/unzip -o -q file.zip -d destinationFolder and although got some error too, but at least the zip file was unzipped to the designated destination folder. Below is the error:
/usr/bin/unzip -o -q file.zip -d destinationFolder
warning: home/runner/work/_temp/SymbolClient/0.2.241/symbol.app.buildtask.zip appears to use backslashes as path separators
/workspaces/action-publish-symbols/node_modules/@actions/exec/lib/toolrunner.js:592
error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
^
Error: The process '/usr/bin/unzip' failed with exit code 1
In my code, I treated it as warning but moved on. However, if the tool cache's extractZip could work in this, that would be most preferred.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the tool cache's extractZip entry point and reproduce the Linux failure with /usr/bin/unzip -o -q file.zip. Compare the command and exit status with the Windows behavior, including the -d destinationFolder case and the backslash-path warning. Done means extracting the downloaded archive on Linux completes successfully without an unexpected failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100