Skip to content

Conversation

Isty001
Copy link
Member

@Isty001 Isty001 commented Nov 17, 2022

When a package cannot be fetched, then it shouldn't be cached. Reproduction:

  • package.json in the repo https://github.com/h2non/semver.c is versioned to 1.0.0, but the actual tag is v1.0.0
  • clib install h2non/semver.c will fail for the first time, but the source files will be cached only containing a 404: Not Found string
  • For the second time these invalid files will be installed

A package should be cached only if it could be fetched and installed successfully

@jwerle
Copy link
Member

jwerle commented Nov 17, 2022

Nice catch!

@Isty001 Isty001 merged commit 0d347e6 into master Nov 18, 2022
@Isty001 Isty001 deleted the invalid-cache branch November 18, 2022 05:41
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.

2 participants