replace expect with bash.

This commit is contained in:
Jörg Thalheim
2025-01-09 12:41:34 +01:00
parent f36cc50767
commit eae450df95

View File

@@ -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
''
);