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 00:22:58 -05:00
committed by GitHub
parent 1288a83e42
commit 5eaf809851
46 changed files with 190 additions and 172 deletions

View File

@ -37,7 +37,7 @@ func TestTemplateDelete(t *testing.T) {
execDone <- inv.Run()
}()
pty.ExpectMatch(fmt.Sprintf("Delete these templates: %s?", cliui.Styles.Code.Render(template.Name)))
pty.ExpectMatch(fmt.Sprintf("Delete these templates: %s?", cliui.DefaultStyles.Code.Render(template.Name)))
pty.WriteLine("yes")
require.NoError(t, <-execDone)
@ -95,7 +95,7 @@ func TestTemplateDelete(t *testing.T) {
execDone <- inv.Run()
}()
pty.ExpectMatch(fmt.Sprintf("Delete these templates: %s?", cliui.Styles.Code.Render(strings.Join(templateNames, ", "))))
pty.ExpectMatch(fmt.Sprintf("Delete these templates: %s?", cliui.DefaultStyles.Code.Render(strings.Join(templateNames, ", "))))
pty.WriteLine("yes")
require.NoError(t, <-execDone)