Display message when logging into existing account

This commit is contained in:
William Martin 2023-11-28 13:25:45 +01:00
parent a9acece7dd
commit 1bf6023164
6 changed files with 101 additions and 1 deletions

View file

@ -177,6 +177,7 @@ func loginRun(opts *LoginOptions) error {
if err != nil {
return fmt.Errorf("error retrieving current user: %w", err)
}
// Adding a user key ensures that a nonempty host section gets written to the config file.
_, loginErr := authCfg.Login(hostname, username, opts.Token, opts.GitProtocol, !opts.InsecureStorage)
return loginErr