Skip to content
Snippets Groups Projects
Commit 11734334 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

cli-auth-config: explicitly message about skipped update

At the end of a auth-config command run, we ask the user if the newly
obtained token should be written on disk or discarded.

The default is to discard it (which seems a bit weird, but is not the
point here). Unlike what we do on write, where a green confirmation
message is displayed, we do not display any message when discarding.
So a user doing things a bit too fast can imagine that the update went
all fine as it just display a wall of green messages.

So we add a simple yellow message pointing out that we ultimately did
not write the new token. That should fix the problem.
parent f1e7c221
No related branches found
No related tags found
1 merge request!62cli-auth-config: explicitly message about skipped token update
Pipeline #8705 passed
......@@ -275,7 +275,10 @@ def auth_config(ctx: Context, username: str, token: str):
ctx.fail(keycloak_error_message(ke))
# Save auth configuration file?
msg = f"Skipping write of authentication configuration file {config_file}"
if not click.confirm(f"Save authentication settings to {config_file}?"):
click.echo(click.style(msg, fg="yellow"))
ctx.exit(0)
# Save configuration to file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment