use updated token

This commit is contained in:
techknowlogick 2025-02-28 02:15:32 -05:00
parent 7b46afacee
commit 9a83e92a80

View File

@ -110,6 +110,12 @@ var CmdLoginHelper = cli.Command{
if err != nil {
return err
}
// Once token is refreshed, get the latest from the updated config
refreshedConfig := config.GetLoginByHost(wants["host"])
if refreshedConfig != nil {
userConfig = refreshedConfig
}
}
_, err = fmt.Fprintf(os.Stdout, "protocol=%s\nhost=%s\nusername=%s\npassword=%s\n", host.Scheme, host.Host, userConfig.User, userConfig.Token)