Skip to content

Commit 7fa8132

Browse files
committed
mention --no-open in logs
1 parent 5bd8b53 commit 7fa8132

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

cli/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ func (r *RootCmd) Command(subcommands []*serpent.Command) (*serpent.Command, err
411411
{
412412
Flag: varNoOpen,
413413
Env: "CODER_NO_OPEN",
414-
Description: "Suppress opening the browser after logging in.",
414+
Description: "Suppress opening the browser when logging in, or starting the server.",
415415
Value: serpent.BoolOf(&r.noOpen),
416416
Hidden: true,
417417
Group: globalGroup,

cli/server.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,10 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
493493
Render(fmt.Sprintf("View the Web UI:\n%s",
494494
pretty.Sprint(cliui.DefaultStyles.Hyperlink, accessURL))))
495495
if buildinfo.HasSite() {
496-
_ = openURL(inv, accessURL)
496+
err = openURL(inv, accessURL)
497+
if err == nil {
498+
cliui.Infof(inv.Stdout, "Opening local browser... You can disable this by passing --no-open.\n")
499+
}
497500
}
498501

499502
// Used for zero-trust instance identity with Google Cloud.

0 commit comments

Comments
 (0)