Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message to warn users about default install path #392

Merged
merged 2 commits into from
Mar 14, 2023

Conversation

pballandras
Copy link
Contributor

Starting with MacOS Ventura (13.X), the /usr/local/bin folder is owned by root on new installs.

This aims to clarify to users with new macs what is going on and guide them when the installer fails.

This PR adds:

  • A warning to Mac users specifically that have not changed the install path. This aims at catching the error case that will probably happen often moving forward.
  • Two possible solutions

This PR doesn't add:

  • A real fix: We can't fix that Apple changed the rights on a folder. Instead we give more information.
  • The execution of the solution. We leave the user to decide what solution he wants to apply.

get-latest-tgf.sh Outdated Show resolved Hide resolved
# Mac OSX
echo "Since MacOS Ventura (13.X), the default install path is owned by 'root'."
echo "You can fix this by either"
echo " 1. Running 'sudo chown -R $(id -un):$(id -gn) $TGF_PATH'."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The $(...) parts are evaluated during the display of the message, comments?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe @dotboris can recommend something from his bag of tricks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#bash 🧙‍♂️

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly it's fine. That's how you do it. I know that there's a $USER variable you could rely on but I feel that your implementation would work in more cases.

@pballandras pballandras requested review from a team March 9, 2023 11:00
@pballandras pballandras marked this pull request as ready for review March 9, 2023 11:03
@jonapich jonapich requested a review from dotboris March 13, 2023 10:00
# Mac OSX
echo "Since MacOS Ventura (13.X), the default install path is owned by 'root'."
echo "You can fix this by either"
echo " 1. Running 'sudo chown -R $(id -un):$(id -gn) $TGF_PATH'."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly it's fine. That's how you do it. I know that there's a $USER variable you could rely on but I feel that your implementation would work in more cases.

@pballandras pballandras merged commit 50236d3 into master Mar 14, 2023
@pballandras pballandras deleted the fix/update-shell-script-for-macos-ventura branch March 14, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants