nixos-rebuild-ng: Validate Once

This commit is contained in:
Reese
2026-07-08 07:23:56 +12:00
parent af30e6b4b1
commit 99178dc67f

View File

@@ -248,11 +248,8 @@ def parse_args(
parser.print_help()
parser.exit()
if args.action is None and len(sys.argv) > 1:
parser.error(f"No valid subcommand (Eg: nixos-rebuild switch). Type {parser.prog} --help for more information")
if args.action is None:
parser.error(f"No valid args or subcommands. Type {parser.prog} --help for more information")
parser.error(f"No valid subcommands. Type {parser.prog} --help for more information")
def parser_warn(msg: str) -> None:
print(f"{parser.prog}: warning: {msg}", file=sys.stderr)