'Why doesn't shell scripts in Shortcuts see my utilities?

i tried using shortcuts. i wanted to run scripts there, but i constantly get an error that the brew utility was not found. it feels like the scripts run in isolation.

i tried use

  1. brew link php
  2. eval 'brew link php'
  3. sh fileWithMyScript.sh

and always got error. how to fix it?

enter image description here

enter image description here enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source