Hide version info if user has not defined version
This commit is contained in:
parent
4805bd168c
commit
864c8349d5
3
app.go
3
app.go
@ -110,7 +110,6 @@ func NewApp() *App {
|
|||||||
HelpName: filepath.Base(os.Args[0]),
|
HelpName: filepath.Base(os.Args[0]),
|
||||||
Usage: "A new cli application",
|
Usage: "A new cli application",
|
||||||
UsageText: "",
|
UsageText: "",
|
||||||
Version: "0.0.0",
|
|
||||||
BashComplete: DefaultAppComplete,
|
BashComplete: DefaultAppComplete,
|
||||||
Action: helpCommand.Action,
|
Action: helpCommand.Action,
|
||||||
Compiled: compileTime(),
|
Compiled: compileTime(),
|
||||||
@ -141,7 +140,7 @@ func (a *App) Setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if a.Version == "" {
|
if a.Version == "" {
|
||||||
a.Version = "0.0.0"
|
a.HideVersion = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if a.BashComplete == nil {
|
if a.BashComplete == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user