1
1
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-09-11 12:49:18 +03:00

darwin-rebuild: fix activate without an existing profile

This commit is contained in:
Daiderd Jordan 2019-06-05 23:23:59 +02:00
parent d56312be06
commit 7aa0ad23f4
No known key found for this signature in database
GPG Key ID: D02435D05B810C96

View File

@ -114,10 +114,14 @@ if [ "$action" = list -o "$action" = rollback ]; then
fi
fi
if [ "$action" = activate -o "$action" = rollback -o "$action" = check ]; then
if [ "$action" = rollback -o "$action" = check ]; then
systemConfig="$(cat $profile/systemConfig)"
fi
if [ "$action" = activate ]; then
systemConfig=$(readlink -f "${0%*/sw/bin/darwin-rebuild}")
fi
if [ -z "$systemConfig" ]; then exit 0; fi
if [ "$action" = switch ]; then