Skip to content

Commit

Permalink
Added Debug Flag
Browse files Browse the repository at this point in the history
  • Loading branch information
pegvin committed Mar 22, 2022
1 parent 841c5c2 commit ced051a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var cli struct {
Search commands.SearchCmd `cmd:"" help:"Search for appliation from appimage list."`
Clean commands.CleanCmd `cmd:"" help:"Clean all the cache."`
Version VersionFlag `name:"version" help:"Print version information and quit"`
Debug bool `help:"Show extra information for debugging."`
}

func (v VersionFlag) BeforeApply(app *kong.Kong, vars kong.Vars) error {
Expand All @@ -35,9 +36,9 @@ func main() {
Compact: true,
}),
kong.Vars{
"VERSION": "0.4.1",
"VERSION": "0.4.2",
})
// Call the Run() method of the selected parsed command.
err := ctx.Run()
err := ctx.Run(cli.Debug)
ctx.FatalIfErrorf(err)
}

0 comments on commit ced051a

Please sign in to comment.