Skip to content

chore: add site flag to buildinfo #14868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
mention --no-open in logs
  • Loading branch information
ethanndickson committed Oct 1, 2024
commit 9075bf9cabc3e10ac1bc49b78ddfc6de87d2ea8d
2 changes: 1 addition & 1 deletion cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ func (r *RootCmd) Command(subcommands []*serpent.Command) (*serpent.Command, err
{
Flag: varNoOpen,
Env: "CODER_NO_OPEN",
Description: "Suppress opening the browser after logging in.",
Description: "Suppress opening the browser when logging in, or starting the server.",
Value: serpent.BoolOf(&r.noOpen),
Hidden: true,
Group: globalGroup,
Expand Down
5 changes: 4 additions & 1 deletion cli/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,10 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
Render(fmt.Sprintf("View the Web UI:\n%s",
pretty.Sprint(cliui.DefaultStyles.Hyperlink, accessURL))))
if buildinfo.HasSite() {
_ = openURL(inv, accessURL)
err = openURL(inv, accessURL)
if err == nil {
cliui.Infof(inv.Stdout, "Opening local browser... You can disable this by passing --no-open.\n")
}
}

// Used for zero-trust instance identity with Google Cloud.
Expand Down
Loading