Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ If scan_updates_baseline is true, ndrift updates baseline after each scan.
### Requirements

1. Linux
2. Python 3
3. optional: lsattr for filesystem attribute checks
4. optional: AWS CLI for object storage report upload
2. Python 3.6 or newer
3. for Python 3.6 only: dataclasses backport package
4. optional: lsattr for filesystem attribute checks
5. optional: AWS CLI for object storage report upload

### Local install in project directory

Expand Down
6 changes: 5 additions & 1 deletion ndrift
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,8 @@ def build_parser() -> argparse.ArgumentParser:
prog="ndrift",
description="Lightweight file integrity monitor for Linux",
)
sub = parser.add_subparsers(dest="command", required=True)
sub = parser.add_subparsers(dest="command")
sub.required = True

init_cmd = sub.add_parser("init", help="create baseline")
init_cmd.add_argument("directories", nargs="+", help="directories to monitor")
Expand Down Expand Up @@ -1338,6 +1339,9 @@ def main(argv: Optional[List[str]] = None) -> int:
"""Main entry point for CLI execution."""
parser = build_parser()
args = parser.parse_args(argv)
if getattr(args, "command", None) is None:
parser.print_help(sys.stderr)
return EXIT_ERROR
try:
return dispatch(args)
except NdriftError as exc:
Expand Down
Loading