fix(cli): speed up CLI over SSH (#7885)

By caching the terminal's color profile, we avoid myriad round trips during command execution.
This commit is contained in:
Ammar Bandukwala
2023-06-07 05:22:58 +00:00
committed by GitHub
parent 1288a83e42
commit 5eaf809851
46 changed files with 190 additions and 172 deletions
+3 -3
View File
@@ -133,11 +133,11 @@ func (r *RootCmd) templateCreate() *clibase.Cmd {
return err
}
_, _ = fmt.Fprintln(inv.Stdout, "\n"+cliui.Styles.Wrap.Render(
"The "+cliui.Styles.Keyword.Render(templateName)+" template has been created at "+cliui.Styles.DateTimeStamp.Render(time.Now().Format(time.Stamp))+"! "+
_, _ = fmt.Fprintln(inv.Stdout, "\n"+cliui.DefaultStyles.Wrap.Render(
"The "+cliui.DefaultStyles.Keyword.Render(templateName)+" template has been created at "+cliui.DefaultStyles.DateTimeStamp.Render(time.Now().Format(time.Stamp))+"! "+
"Developers can provision a workspace with this template using:")+"\n")
_, _ = fmt.Fprintln(inv.Stdout, " "+cliui.Styles.Code.Render(fmt.Sprintf("coder create --template=%q [workspace name]", templateName)))
_, _ = fmt.Fprintln(inv.Stdout, " "+cliui.DefaultStyles.Code.Render(fmt.Sprintf("coder create --template=%q [workspace name]", templateName)))
_, _ = fmt.Fprintln(inv.Stdout)
return nil