[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: guix-install.sh: Fix GUIX_ALLOW_OVERWRITE conditi
From: |
guix-commits |
Subject: |
branch master updated: guix-install.sh: Fix GUIX_ALLOW_OVERWRITE condition. |
Date: |
Mon, 24 Apr 2023 12:57:08 -0400 |
This is an automated email from the git hooks/post-receive script.
apteryx pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new e29571afc6 guix-install.sh: Fix GUIX_ALLOW_OVERWRITE condition.
e29571afc6 is described below
commit e29571afc642dd4dd3388f742755f1675b3058e6
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Mon Apr 24 12:46:22 2023 -0400
guix-install.sh: Fix GUIX_ALLOW_OVERWRITE condition.
Before this change, the "Overwriting existing installation!" would be
displayed erroneously.
* etc/guix-install.sh (sys_create_store): Fix overwrite conditional.
---
etc/guix-install.sh | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index bbb4219965..e81da7ae71 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -9,7 +9,7 @@
# Copyright © 2020 Daniel Brooks <db48x@db48x.net>
# Copyright © 2021 Jakub Kądziołka <kuba@kadziolka.net>
# Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
-# Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+# Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
# Copyright © 2022 Prafulla Giri <prafulla.giri@protonmail.com>
# Copyright © 2023 Andrew Tropin <andrew@trop.in>
#
@@ -353,10 +353,12 @@ sys_create_store()
_debug "--- [ ${FUNCNAME[0]} ] ---"
- if [[ -z $GUIX_ALLOW_OVERWRITE && (-e /var/guix || -e /gnu) ]]; then
- die "A previous Guix installation was found. Refusing to overwrite."
- else
- _msg "${WAR}Overwriting existing installation!"
+ if [[ -e /var/guix && -e /gnu ]]; then
+ if [ -n "$GUIX_ALLOW_OVERWRITE" ]; then
+ _msg "${WAR}Overwriting existing installation!"
+ else
+ die "A previous Guix installation was found. Refusing to
overwrite."
+ fi
fi
cd "$tmp_path"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: guix-install.sh: Fix GUIX_ALLOW_OVERWRITE condition.,
guix-commits <=