From 1420430d391eba5f3046e7dad343c2ebdcb7ceb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 9 Jan 2025 12:41:34 +0100 Subject: [PATCH] replace expect with bash. --- pkgs/distro-packages/flake-module.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/distro-packages/flake-module.nix b/pkgs/distro-packages/flake-module.nix index 4824e15a4..5b1feb771 100644 --- a/pkgs/distro-packages/flake-module.nix +++ b/pkgs/distro-packages/flake-module.nix @@ -13,12 +13,13 @@ pkgs.runCommand "deb-gui-install-test" { } '' ${pkgs.dpkg}/bin/dpkg -i ${self'.checks.package-gui-installer-deb}/*.deb ls -la /usr/bin/clan-app - ${pkgs.expect}/bin/expect -c ' - spawn /usr/bin/clan-app - expect "Clan requires Nix to be installed. Would you like to install it now? (y/n)" - send "n" - expect "Clan cannot run without Nix. Exiting." - ' + while IFS= read -r line; do + if [[ "$line" == "Clan requires Nix to be installed. Would you like to install it now? (y/n)" ]]; then + echo "n" + elif [[ "$line" == "Clan cannot run without Nix. Exiting." ]]; then + break + fi + done < <(/usr/bin/clan-app) touch $out '' );