From 7d4cbcd2352889f62b0944bdae84d09531de1732 Mon Sep 17 00:00:00 2001 From: Felix Uhl Date: Sun, 10 Nov 2024 15:27:36 +0100 Subject: [PATCH] cli: Fix legacy aliases Fixes regression introduced in daca7be3092f253e5a3c9ce059d5a0225de6902d that would cause the following behavior: $ ./disko --mode disko --dry-run example/simple-efi.nix /nix/store/syiv3fhzd7ar2nk5pbh56gswcs4fzvxs-disko/bin/* Now, it returns the correct script path again: $ ./disko --mode disko --dry-run example/simple-efi.nix /nix/store/syiv3fhzd7ar2nk5pbh56gswcs4fzvxs-disko --- disko | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/disko b/disko index 97700b6..cb86d44 100755 --- a/disko +++ b/disko @@ -181,6 +181,11 @@ if [[ $mode = "destroy,format,mount" && $skip_destroy_safety_check = true ]]; th command+=("--yes-wipe-all-disks") fi +# Legacy modes don't support --yes-wipe-all-disks and are not in `$script/bin` +if [[ $mode = "disko" ]] || [[ $mode = "create" ]] || [[ $mode = "zap_create_mount" ]] ; then + command=("$script") +fi + if [[ -n "${dry_run+x}" ]]; then echo "${command[@]}" else