I assume this is an easy fix, but I have searched the forum and the wiki and not found the problem. I am using a keystroke (Cmd-L) to copy the URL from Firefox, assigning it to a variable ("Address") and attempting to access that variable in shell script that calls the clean-mark app, installed by Brew to /usr/local/bin/clean-mark.
In the Execute Shell Script section of the macro, I have this command:
This works perfectly on the command line, where "$KMVAR_Address" is replaced with the URL of the webpage to convert to Markdown. But when I run it in KBM, the script fails with the following error:
Execute a Shell Script failed with script error: env: node: No such file or directory.
Any advice?
Note: this seems to be similar to the (currently unresolved) problem encountered here: Execute Shell Script Help
Good idea! I ran the first one and it turns out that PATH only includes /usr/bin:/bin:/usr/sbin:/sbin and node is at /usr/local/bin/node (as are all the other Brew-installed apps).
I have added PATH=$PATH:/usr/local/bin as the first line in my shell script and clean-mark now works, as it is able to find node. Thanks!
Is there a means of setting KBM's default PATH to include /usr/local/bin so I don't need to specify it every time I run a shell script?