mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
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.
This commit is contained in:
parent
23f11afacd
commit
e29571afc6
1 changed files with 7 additions and 5 deletions
|
@ -9,7 +9,7 @@
|
||||||
# Copyright © 2020 Daniel Brooks <db48x@db48x.net>
|
# Copyright © 2020 Daniel Brooks <db48x@db48x.net>
|
||||||
# Copyright © 2021 Jakub Kądziołka <kuba@kadziolka.net>
|
# Copyright © 2021 Jakub Kądziołka <kuba@kadziolka.net>
|
||||||
# Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
|
# 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 © 2022 Prafulla Giri <prafulla.giri@protonmail.com>
|
||||||
# Copyright © 2023 Andrew Tropin <andrew@trop.in>
|
# Copyright © 2023 Andrew Tropin <andrew@trop.in>
|
||||||
#
|
#
|
||||||
|
@ -353,10 +353,12 @@ sys_create_store()
|
||||||
|
|
||||||
_debug "--- [ ${FUNCNAME[0]} ] ---"
|
_debug "--- [ ${FUNCNAME[0]} ] ---"
|
||||||
|
|
||||||
if [[ -z $GUIX_ALLOW_OVERWRITE && (-e /var/guix || -e /gnu) ]]; then
|
if [[ -e /var/guix && -e /gnu ]]; then
|
||||||
die "A previous Guix installation was found. Refusing to overwrite."
|
if [ -n "$GUIX_ALLOW_OVERWRITE" ]; then
|
||||||
else
|
|
||||||
_msg "${WAR}Overwriting existing installation!"
|
_msg "${WAR}Overwriting existing installation!"
|
||||||
|
else
|
||||||
|
die "A previous Guix installation was found. Refusing to overwrite."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$tmp_path"
|
cd "$tmp_path"
|
||||||
|
|
Loading…
Reference in a new issue