show env var in help, reset terminal mode correctly

This commit is contained in:
mleku
2025-01-21 16:13:28 -01:06
committed by fiatjaf_
parent 5509095277
commit aa53f2cd60
2 changed files with 6 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ import (
"github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/sdk"
"github.com/nbd-wtf/go-nostr/sdk/hints/memoryh"
"github.com/fatih/color"
)
var version string = "debug"
@@ -118,8 +119,12 @@ var app = &cli.Command{
}
func main() {
defer func() {
color.New(color.Reset).Println()
}()
if err := app.Run(context.Background(), os.Args); err != nil {
stdout(err)
color.New(color.Reset).Println()
os.Exit(1)
}
}