julia-actions / cache

A shortcut action to cache Julia artifacts, packages, and registries.
MIT License
38 stars 9 forks source link

Avoid corrupting existing cloned Julia registries #102

Closed omus closed 10 months ago

omus commented 10 months ago

Avoid restoring cached registries when the user already has registries in the Julia depot. If we restore the cached registries for cloned repos we end up putting the registry worktree into a dirty state which will cause failures when attempting to update the registry later.

Fixes #94.

omus commented 10 months ago

Successfully reproduced the failure seen in #94:

Updating registry at `~/.julia/registries/General`
    Updating git-repo `[https://github.com/JuliaRegistries/General.git`](https://github.com/JuliaRegistries/General.git%60)
ERROR: LoadError: GitError(Code:EMERGECONFLICT, Class:Checkout, 12 conflicts prevent checkout)

https://github.com/julia-actions/cache/actions/runs/7532680593/job/20503798211?pr=102#step:5:17