Skip to content

Commit

Permalink
Add vcs revision to version string
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Nov 14, 2022
1 parent 4ac4ee6 commit d39036d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/cli/infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,13 @@ func show_help(cmd *cobra.Command, args []string) {
}

func Init(root *cobra.Command) {
vs := kitty.VersionString
if kitty.VCSRevision != "" {
vs = vs + " (" + kitty.VCSRevision + ")"
}
stdout_is_terminal = isatty.IsTerminal(os.Stdout.Fd())
RootCmd = root
root.Version = kitty.VersionString
root.Version = vs
root.SetUsageFunc(show_usage)
root.SetHelpFunc(show_help)
}

0 comments on commit d39036d

Please sign in to comment.