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
+2 -2
View File
@@ -35,9 +35,9 @@ func (vi versionInfo) String() string {
_, _ = str.WriteString("\r\n" + vi.ExternalURL + "\r\n\r\n")
if vi.Slim {
_, _ = str.WriteString(fmt.Sprintf("Slim build of Coder, does not support the %s subcommand.", cliui.Styles.Code.Render("server")))
_, _ = str.WriteString(fmt.Sprintf("Slim build of Coder, does not support the %s subcommand.", cliui.DefaultStyles.Code.Render("server")))
} else {
_, _ = str.WriteString(fmt.Sprintf("Full build of Coder, supports the %s subcommand.", cliui.Styles.Code.Render("server")))
_, _ = str.WriteString(fmt.Sprintf("Full build of Coder, supports the %s subcommand.", cliui.DefaultStyles.Code.Render("server")))
}
return str.String()
}