Merge pull request #6079 from white-hat/6066-fix-git-protocol

fix protocol not being set when token is read from stdin
This commit is contained in:
Nate Smith 2022-08-15 16:54:59 -05:00 committed by GitHub
commit 49adbe3fe6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -153,7 +153,9 @@ func loginRun(opts *LoginOptions) error {
if err := shared.HasMinimumScopes(httpClient, hostname, opts.Token); err != nil {
return fmt.Errorf("error validating token: %w", err)
}
if opts.GitProtocol != "" {
cfg.Set(hostname, "git_protocol", opts.GitProtocol)
}
return cfg.Write()
}