mirror of
https://github.com/fiatjaf/nak.git
synced 2025-08-31 22:10:47 -04:00
fix -v verbose flag (it was being used by the default --version flag).
This commit is contained in:
13
main.go
13
main.go
@@ -7,7 +7,6 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/fiatjaf/cli/v3"
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
"github.com/nbd-wtf/go-nostr/sdk"
|
||||
@@ -133,12 +132,16 @@ var app = &cli.Command{
|
||||
}
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
color.New(color.Reset).Print()
|
||||
}()
|
||||
defer colors.reset()
|
||||
|
||||
cli.VersionFlag = &cli.BoolFlag{
|
||||
Name: "version",
|
||||
Usage: "prints the version",
|
||||
}
|
||||
|
||||
if err := app.Run(context.Background(), os.Args); err != nil {
|
||||
stdout(err)
|
||||
color.New(color.Reset).Print()
|
||||
colors.reset()
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user