How should root's path be modified by a formula? #2231
Unanswered
gdiamond
asked this question in
Writing Formulae/Casks
Replies: 1 comment 1 reply
-
It is:
The problem you're seeing is that
So try running this instead:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I installed
mtr
today on macOS Catalina but it was not in root's or my user's path when the installation was completed.I understand that
mtr
is an admin application installed in/usr/local/sbin
. It's not meant to be used by any old user so it doesn't need to be in my path but it should be in root's path. But when I try running as suggested I getsudo: mtr: command not found
.Does this happen for everyone?
I was able to fix the problem by creating
/etc/paths.d/mtr
with the path/usr/local/sbin
.Is this an appropriate solution? Maybe the formula can suggest to the user to run the command if they want it added to the path? Otherwise, the recommendation to
run 'sudo mtr'
should be changed torun 'sudo /usr/local/sbin/mtr'
.I haven't seen other brew formulas doing it this way but some installers are doing it.
Beta Was this translation helpful? Give feedback.
All reactions