mirror of
https://github.com/coder/coder.git
synced 2025-07-18 14:17:22 +00:00
fix: output askpass to stderr (#7034)
This fixes askpass not outputting a prompt.
This commit is contained in:
@ -51,9 +51,9 @@ func (r *RootCmd) gitAskpass() *clibase.Cmd {
|
||||
}
|
||||
if token.URL != "" {
|
||||
if err := openURL(inv, token.URL); err == nil {
|
||||
cliui.Infof(inv.Stdout, "Your browser has been opened to authenticate with Git:\n\n\t%s\n\n", token.URL)
|
||||
cliui.Infof(inv.Stderr, "Your browser has been opened to authenticate with Git:\n\n\t%s\n\n", token.URL)
|
||||
} else {
|
||||
cliui.Infof(inv.Stdout, "Open the following URL to authenticate with Git:\n\n\t%s\n\n", token.URL)
|
||||
cliui.Infof(inv.Stderr, "Open the following URL to authenticate with Git:\n\n\t%s\n\n", token.URL)
|
||||
}
|
||||
|
||||
for r := retry.New(250*time.Millisecond, 10*time.Second); r.Wait(ctx); {
|
||||
@ -61,7 +61,7 @@ func (r *RootCmd) gitAskpass() *clibase.Cmd {
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
cliui.Infof(inv.Stdout, "You've been authenticated with Git!\n")
|
||||
cliui.Infof(inv.Stderr, "You've been authenticated with Git!\n")
|
||||
break
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user