mirror of
https://github.com/rancher/os.git
synced 2025-07-31 22:47:16 +00:00
Report image version when using ros version subcommand (#2213)
This commit is contained in:
parent
8b196aaf35
commit
480e45cd01
@ -12,6 +12,11 @@ import (
|
|||||||
|
|
||||||
func Main() {
|
func Main() {
|
||||||
log.InitLogger()
|
log.InitLogger()
|
||||||
|
cli.VersionPrinter = func(c *cli.Context) {
|
||||||
|
cfg := config.LoadConfig()
|
||||||
|
runningName := cfg.Rancher.Upgrade.Image + ":" + config.Version
|
||||||
|
fmt.Fprintf(c.App.Writer, "version %s from os image %s\n", c.App.Version, runningName)
|
||||||
|
}
|
||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
|
|
||||||
app.Name = os.Args[0]
|
app.Name = os.Args[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user