nixos-rebuild-ng: also warn --diff usage for other actions

This commit is contained in:
Thiago Kenji Okada
2026-02-24 23:24:33 +00:00
parent bee0c1144e
commit ac1f211013
@@ -265,7 +265,16 @@ def parse_args(
if args.no_build_nix:
parser_warn("--no-build-nix is deprecated, we do not build nix anymore")
if args.action == Action.DRY_BUILD.value and args.diff:
if (
args.action
in (
Action.DRY_BUILD.value, # --diff breaks dry-build
Action.EDIT.value,
Action.LIST_GENERATIONS.value,
Action.REPL.value,
)
and args.diff
):
parser_warn(f"--diff is a no-op with '{args.action}'")
args.diff = False