Skip to content

Commit

Permalink
Fix wrong boolean arg handling
Browse files Browse the repository at this point in the history
  • Loading branch information
fkglr committed Oct 14, 2024
1 parent aa7706d commit 5428035
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gallia/command/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def run(self) -> int:

class ScannerConfig(AsyncScriptConfig, argument_group="scanner", config_section="gallia.scanner"):
dumpcap: bool = Field(
sys.platform == "linux", description="Enable/Disable creating a pcap file"
sys.platform.startswith("linux"), description="Enable/Disable creating a pcap file"
)
target: Idempotent[TargetURI] = Field(
description="URI that describes the target", metavar="TARGET"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def parse_field(

# Add Boolean Field
parser.add_argument(
*field.arg_names(),
*field.arg_names(is_inverted),
action=action,
help=field.description(),
**field.arg_required(),
Expand Down

0 comments on commit 5428035

Please sign in to comment.