cli: boolean logic is hard

This commit is contained in:
Łukasz Magiera 2021-11-29 21:41:38 +01:00
parent 320b36495d
commit 092e12d1be

View File

@ -291,7 +291,7 @@ Examples:
}
if cctx.Bool("car-export-merkle-proof") {
if !cctx.Bool("car") && !cctx.IsSet("data-selector") {
if !cctx.Bool("car") || !cctx.IsSet("data-selector") {
return ShowHelp(cctx, fmt.Errorf("--car-export-merkle-proof requires --car and --data-selector"))
}
}