Skip to content

Registry update failures should throw or return status #4244

@omus

Description

@omus

When using Pkg.Registry.update() if a registry fails to be updated an error is logged but there is no exception or return value to indicate this. This can make it difficult to work with this function call in automated scripts such as Dockerfiles where you may want to abort immediately if registries fail to update:

...
#14 1.239     Updating registry at `/usr/local/share/julia-depot/registries/Private`
#14 1.275     Updating git-repo `https://github.com/.../PrivateRegistry.git`
#14 1.621 Username for 'https://github.com' [git]:     Updating registry at `/usr/local/share/julia-depot/registries/General.toml`
#14 1.816 ┌ Error: Some registries failed to update:
#14 1.816 │     — /usr/local/share/julia-depot/registries/Private — failed to fetch from repo: failed to fetch from https://github.com/../PrivateRegistry.git, error: GitError(Code:EUSER, Class:Callback, Aborting, user cancelled credential request.)
#14 1.816 └ @ Pkg.Registry /usr/local/julia/share/julia/stdlib/v1.10/Pkg/src/Registry/Registry.jl:528
#14 2.026 ┌ Warning: The active manifest file has dependencies that were resolved with a different julia version (1.11.5). Unexpected behavior may occur.
#14 2.026 └ @ /project/Manifest.toml:0
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions