feat: improve coder users show output, add json format (#3176)

This commit is contained in:
Dean Sheather
2022-07-26 15:47:12 -05:00
committed by GitHub
parent aaf0da27ef
commit df20dd7374
4 changed files with 200 additions and 31 deletions
+2 -2
View File
@@ -476,8 +476,8 @@ download the server version with: 'curl -L https://coder.com/install.sh | sh -s
if !buildinfo.VersionsMatch(clientVersion, info.Version) {
warn := cliui.Styles.Warn.Copy().Align(lipgloss.Left)
// Trim the leading 'v', our install.sh script does not handle this case well.
_, _ = fmt.Fprintf(cmd.OutOrStdout(), warn.Render(fmtWarningText), clientVersion, info.Version, strings.TrimPrefix(info.CanonicalVersion(), "v"))
_, _ = fmt.Fprintln(cmd.OutOrStdout())
_, _ = fmt.Fprintf(cmd.ErrOrStderr(), warn.Render(fmtWarningText), clientVersion, info.Version, strings.TrimPrefix(info.CanonicalVersion(), "v"))
_, _ = fmt.Fprintln(cmd.ErrOrStderr())
}
return nil