From ae3ac9bc10395d9ed1856cfadbf99610e573f229 Mon Sep 17 00:00:00 2001
From: JennaHuntsman <jenna.salem.sf@gmail.com>
Date: Sun, 15 Jan 2023 12:08:23 -0500
Subject: [PATCH] Fix an oops which could prevent the installer running on some
 environments.

---
 indra/newview/linux_tools/install.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/indra/newview/linux_tools/install.sh b/indra/newview/linux_tools/install.sh
index 8b22aae81c8..b69e281b4e0 100755
--- a/indra/newview/linux_tools/install.sh
+++ b/indra/newview/linux_tools/install.sh
@@ -55,10 +55,13 @@ function homedir_install()
 
     prompt "Proceed with the installation? [Y/N]: "
     if [[ $? == 0 ]]; then
-	exit 0
+	    exit 0
+    fi
+    if [[ -z "$XDG_DATA_HOME" ]]
+        install_to_prefix "$XDG_DATA_HOME/alchemy-install" #$XDG_DATA_HOME is a synonym for $HOME/.local/share/ unless the user has specified otherwise (unlikely).
+    else
+        install_to_prefix "$HOME/.local/share/alchemy-install" #XDG_DATA_HOME not set, so use default path as defined by XDG spec.
     fi
-
-    install_to_prefix "$XDG_DATA_HOME/alchemy-install" #$XDG_DATA_HOME is a synonym for $HOME/.local/share/ unless the user has specified otherwise (unlikely).
 }
 
 function root_install()
-- 
GitLab