8000 chore: edit CLI/UI copy by khorne3 · Pull Request #2247 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore: edit CLI/UI copy #2247

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 24 commits into from
Jun 16, 2022
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
Next Next commit
Merge branch 'main' into cli-ui-copyedits
  • Loading branch information
Katie Horne committed Jun 15, 2022
commit 9400b2f8807225000bcf6fddab7279f7dc3da4b3
32 changes: 9 additions & 23 deletions cli/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,25 +190,11 @@ func server() *cobra.Command {

// If we're attempting to tunnel in dev-mode, the access URL
// needs to be changed to use the tunnel.
if dev && tunnel {
_, _ = fmt.Fprintln(cmd.ErrOrStderr(), cliui.Styles.Wrap.Render(
"Coder requires a URL accessible by workspaces you provision. "+
"A free tunnel can be created for simple setup. This will "+
"expose your Coder deployment to a publicly accessible URL. "+
"If you'd like to use your own hostname, you can provide it "+
"with the "+
cliui.Styles.Field.Render("--access-url")+" flag.\n",
))

// This skips the prompt if the flag is explicitly specified.
if !cmd.Flags().Changed("tunnel") {
_, err = cliui.Prompt(cmd, cliui.PromptOptions{
Text: "Would you like to start a tunnel for simple setup?",
IsConfirm: true,
})
if errors.Is(err, cliui.Canceled) {
return err
}
if tunnel {
cmd.Printf("Opening tunnel so workspaces can connect to your deployment\n")
devTunnel, devTunnelErrChan, err = devtunnel.New(ctxTunnel, logger.Named("devtunnel"))
if err != nil {
return xerrors.Errorf("create tunnel: %w", err)
}
accessURL = devTunnel.URL
}
Expand Down Expand Up @@ -275,10 +261,10 @@ func server() *cobra.Command {
}
}

_, _ = fmt.Fprintf(cmd.ErrOrStderr(), "Access your Coder UI in a browser at: %s\n", accessURL)
_, _ = fmt.Fprintln(cmd.ErrOrStderr())

if !dev {
if inMemoryDatabase {
options.Database = databasefake.New()
options.Pubsub = database.NewPubsubInMemory()
} else {
sqlDB, err := sql.Open(sqlDriver, postgresURL)
if err != nil {
return xerrors.Errorf("dial postgres: %w", err)
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0