From 8d4ae698eaac8bd717e23507da2ca8b345bec4b5 Mon Sep 17 00:00:00 2001 From: Jared Baur Date: Fri, 5 Apr 2024 15:15:38 -0700 Subject: [PATCH] Use existing bash instance when running destroyScript The destroy script already has a bash interpreter in use, but when the `disk-deactivate` script is ran, it calls out to /usr/bin/env to query for a bash interpreter. When running the destroyScript in unique places (such as the stage-1 initrd), /usr/bin/env might not exist, so we can make destroyScript more self-contained by reusing the same bash. --- lib/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/default.nix b/lib/default.nix index f540349..1daa0fc 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -449,7 +449,7 @@ let # shellcheck disable=SC2043 for dev in ${toString (lib.catAttrs "device" (lib.attrValues devices.disk))}; do - ${../disk-deactivate}/disk-deactivate "$dev" + $BASH ${../disk-deactivate}/disk-deactivate "$dev" done ''; };