-
|
I installed mkcert via Homebrew. I can run However, when I create the following script: The output is:
Note that I put Any ideas why mkcert installed via brew not working in shell script or am I doing something wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
|
Try using the full path. |
Beta Was this translation helpful? Give feedback.
-
|
The most common reason: Homebrew's You didn't say how you tried to run your script, but one gotcha that catches every Unix newbie involves cron jobs. Every If you know that a script uses Homebrew-installed binaries, and you don't want to fully-qualify every invocation, simply add: to the start of your script. (That's the same command that's printed at the end of the Homebrew installer script.) |
Beta Was this translation helpful? Give feedback.
-
|
@gromgit @SMillerDev My bad, apologies for my non-extensive details. My aim is to have an automated script that bootstraps new Laravel/PHP projects for me, with SSL fully configured. I am trying to achieve this using mkcert with the script below. Kindly help me fine-tune the script to allow me to achieve this aim, or give me expert opinion perhaps there are better ways of achieving the same: |
Beta Was this translation helpful? Give feedback.
-
|
By the way, the reason why your shell script can't find things you |
Beta Was this translation helpful? Give feedback.
By the way, the reason why your shell script can't find things you
brew installed is because you're running it undersudo. This sanitises the environment it runs in, so/opt/homebrew/binwon't be inPATHin your script.