Skip to content

Commit

Permalink
fix the bug(issue#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevRiver authored and aybabtme committed Oct 25, 2024
1 parent e46b27b commit cc28ad4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/humanlog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,10 @@ func newApp() *cli.App {
signal.Ignore(os.Interrupt)
}

if len(*cfg.Skip) > 0 && len(*cfg.Keep) > 0 {
fatalf(cctx, "can only use one of %q and %q", skipFlag.Name, keepFlag.Name)
if cfg.Skip != nil && cfg.Keep != nil {
if len(*cfg.Skip) > 0 && len(*cfg.Keep) > 0 {
fatalf(cctx, "can only use one of %q and %q", skipFlag.Name, keepFlag.Name)
}
}

sinkOpts, errs := stdiosink.StdioOptsFrom(*cfg)
Expand Down

0 comments on commit cc28ad4

Please sign in to comment.