cli: version to the $ coder header in CLI (#4709)

This commit is contained in:
John
2022-10-24 11:17:48 -05:00
committed by GitHub
parent 6e06cf10e8
commit 0783ca3793
+3 -2
View File
@@ -108,12 +108,13 @@ func AGPL() []*cobra.Command {
}
func Root(subcommands []*cobra.Command) *cobra.Command {
fmtLong := `Coder %s — A tool for provisioning self-hosted development environments with Terraform.
`
cmd := &cobra.Command{
Use: "coder",
SilenceErrors: true,
SilenceUsage: true,
Long: `Coder — A tool for provisioning self-hosted development environments with Terraform.
`,
Long: fmt.Sprintf(fmtLong, buildinfo.Version()),
PersistentPreRun: func(cmd *cobra.Command, args []string) {
if cliflag.IsSetBool(cmd, varNoVersionCheck) &&
cliflag.IsSetBool(cmd, varNoFeatureWarning) {