KM can't find shell commands

Another possibility – which is only mentioned very briefly in this Wiki article – is to set the ENV_PATH variable.

You can do this in KM Editor > Preferences > Variables. For example:

Since all KM variables are global, this will affect every shell script action.

Advantages:

  • Reduces clutter in the shell script actions
  • While still being separated from your Terminal environment, it’s easy to keep the paths in sync with it
  • If you add a new preferred path (or change the order), all script actions adopt it automatically
  • You can always override it by specifying a full path in an action

Disadvantages:

  • Less portable when distributing macros (but portability is always limited when command line tools are involved)

--> Concerning the Wiki:

I found it mentioned also in the Troubleshooting article, but the variable name is not spelled correctly there (“ENVPATH” instead of “ENV_PATH”).

6 Likes