mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
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:
@ -114,8 +114,8 @@ func readOrGenerateConfig(customTunnelHost string) (Config, error) {
|
||||
|
||||
if cfg.Version == 0 {
|
||||
_, _ = fmt.Println()
|
||||
_, _ = fmt.Println(cliui.Styles.Error.Render("You're running a deprecated tunnel version!"))
|
||||
_, _ = fmt.Println(cliui.Styles.Error.Render("Upgrading you to the new version now. You will need to rebuild running workspaces."))
|
||||
_, _ = fmt.Println(cliui.DefaultStyles.Error.Render("You're running a deprecated tunnel version!"))
|
||||
_, _ = fmt.Println(cliui.DefaultStyles.Error.Render("Upgrading you to the new version now. You will need to rebuild running workspaces."))
|
||||
_, _ = fmt.Println()
|
||||
|
||||
cfg, err := GenerateConfig(customTunnelHost)
|
||||
@ -172,8 +172,8 @@ func GenerateConfig(customTunnelHost string) (Config, error) {
|
||||
|
||||
spin.Stop()
|
||||
_, _ = fmt.Printf("Using tunnel in %s with latency %s.\n",
|
||||
cliui.Styles.Keyword.Render(locationName),
|
||||
cliui.Styles.Code.Render(node.AvgLatency.String()),
|
||||
cliui.DefaultStyles.Keyword.Render(locationName),
|
||||
cliui.DefaultStyles.Code.Render(node.AvgLatency.String()),
|
||||
)
|
||||
|
||||
return Config{
|
||||
|
Reference in New Issue
Block a user