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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

restoreCache only cleanup in finally if archivePath is set #1647

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jsoref
Copy link
Contributor

@jsoref jsoref commented Jan 31, 2024

When running tests for actions/download-artifact, I see output akin to:

[Test/Build]   馃挰  ::debug::Resource Url: http://192.168.1.131:60101/_apis/artifactcache/cache?keys=node-cache-Linux-npm-e6ea06a810d13d06734e17284172c796edb36687728216c316fe3e8dbe04d235&version=b3f0cb83629d634645a5146420c017462ebb5229bd60271a7a86e489a6066469
[Test/Build]   馃挰  ::debug::Failed to delete archive: Error: ENOENT: no such file or directory, unlink ''

The current code is broken. -- The try block includes a lot of code that runs and can return early before it sets archivePath, and yet the finally unconditionally calls utils.unlinkFile(archivePath).

@jsoref jsoref requested a review from a team as a code owner January 31, 2024 05:01
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 this pull request may close these issues.

None yet

1 participant