Skip to content

Commit

Permalink
Add message to warn users about default install path (#392)
Browse files Browse the repository at this point in the history
* Add message to warn users about default install path

* Update get-latest-tgf.sh
  • Loading branch information
pballandras authored Mar 14, 2023
1 parent 7c0af16 commit 50236d3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions get-latest-tgf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 50236d3

Please sign in to comment.