1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-10-18 00:16:11 -04:00
This commit is contained in:
Thomas Lloyd-Jones 2024-10-16 15:39:29 -04:00 committed by GitHub
commit c535bfdb9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -58,6 +58,7 @@ readonly EXTRACTED_NIX_PATH="$(dirname "$0")"
readonly ROOT_HOME=~root readonly ROOT_HOME=~root
if [ -t 0 ] && [ -z "${NIX_INSTALLER_YES:-}" ]; then if [ -t 0 ] && [ -z "${NIX_INSTALLER_YES:-}" ]; then
readonly IS_HEADLESS='no' readonly IS_HEADLESS='no'
else else
@ -96,6 +97,12 @@ is_os_darwin() {
fi fi
} }
if [ -d "/nix" ]; then
echo "$(tput setaf 1)Error: /nix already exists on your system.$(tput sgr0)"
echo "$(tput setaf 2)To remove it, you can use the following command: sudo rm -rf /nix$(tput sgr0)"
exit 1
fi
contact_us() { contact_us() {
echo "You can open an issue at" echo "You can open an issue at"
echo "https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md" echo "https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md"