This is driving me crazy to not know for sure what doing on.
Here is a Script and inside I explain what going on and also give the result from my Mojave machine.
How is it possible to get /usr/local/bin to be default in my do shell script.
In the script I said I have execute a sysctl command and that is true. But same command
also say its not possible to change that from the manual page.
And you could see the from second do shell script it doesn’t give me the path to /usr/local/bin
So NOW its possible for me to run any command in do shell script without any directory path to the command inside /usr/local/bin…
(**
* The sysctl command say in manual page its not possible to change user.cs_path flag.
* I'm not sure but I think it maybe are. How could I then explain this.
* I have been able to make /usr/local/bin as default for my do shell script.
*
* I have run this command on my system.
* sysctl -w user.cs_path=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
*
* Or
*
* Have I done something else, it drive me crazy to not know for sure.
*)
-- How is this possible...
do shell script "echo $PATH"
--> "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
do shell script "echo | sysctl user.cs_path"
--> "user.cs_path: /usr/bin:/bin:/usr/sbin:/sbin"
do shell script "echo | sh -version"
(**
* "GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)
* Copyright (C) 2007 Free Software Foundation, Inc."
*)
Does anything have any explanation what going on because I do not know exactly.
After reboot it was back to normal /usr/bin:/bin:/usr/sbin:/sbin
That said I have reboot before and seen it come back… /usr/local/bin:…
There is something on my machine that change the setting…