From 50236d39ca6ecdf010282d729736b4fb58417b47 Mon Sep 17 00:00:00 2001 From: Philippe Ballandras Date: Tue, 14 Mar 2023 14:55:56 +0100 Subject: [PATCH] Add message to warn users about default install path (#392) * Add message to warn users about default install path * Update get-latest-tgf.sh --- get-latest-tgf.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/get-latest-tgf.sh b/get-latest-tgf.sh index fb500e82..02e4d425 100755 --- a/get-latest-tgf.sh +++ b/get-latest-tgf.sh @@ -12,6 +12,14 @@ if [ ! -w "${TGF_PATH}" ]; then if [ "${TGF_PATH}" == "${DEFAULT_INSTALL_DIR}" ]; then # This is a system directory. It's not a good idea to try to make it writeable. echo "System installation directory ${TGF_PATH} is not writeable." + if [[ "$OSTYPE" == "darwin"* && "${TGF_PATH}" == "${DEFAULT_INSTALL_DIR}" ]]; then + # Mac OSX + echo "Since MacOS Ventura (13.X), $TGF_PATH is owned by 'root'." + echo "You can fix this by either" + echo " 1. Running 'sudo chown -R $(id -un):$(id -gn) $TGF_PATH'." + echo " 2. Setting the TGF_PATH variable to an alternate, writable directory." + exit 1 + fi echo "Please set the TGF_PATH environment variable to install to an alternate, writeable directory." exit 1 fi