Skip to content

Conversation

mortenpi
Copy link
Member

@mortenpi mortenpi commented Oct 9, 2025

The return value can be confusing to users, since it looks a bit like an error message:

julia> PkgAuthentication.install("juliahub.com")
#register_auth_error_handler##0 (generic function with 1 method)

So let's wrap it in an object, so we can have a more informative show representation:

julia> uninstall = PkgAuthentication.install()
PkgAuthentication.Uninstall (call this object to remove Pkg hooks)

julia> uninstall()

Also add docs to explain what this is for.

cc @ranjanan

@mortenpi mortenpi requested a review from pfitzseb October 9, 2025 14:16
@pfitzseb
Copy link
Member

pfitzseb commented Oct 9, 2025

The return value is technically meaningful, since it's the only way to unregister the auth handler from Pkg at a later time. That said, I wouldn't mind removing that functionality from install too much.

@mortenpi mortenpi changed the title Do not return anything from install() Return a callable object from install() Oct 10, 2025
@mortenpi mortenpi enabled auto-merge (squash) October 10, 2025 13:24
@mortenpi
Copy link
Member Author

@pfitzseb I updated it to return a callable object instead. Should be good to go if we're happy with it.

@mortenpi mortenpi merged commit c18c118 into master Oct 10, 2025
15 checks passed
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