Debugging ZSH shellscripts in KM

As part of my project to backup all my automations to a git repo, I'm trying to backup devonthink. Thus far the script is the simplest thing in the world.

When I run this from the terminal the files are copied. When I run the same command from the terminal no problem. The files get copied. When I attempt to run from KM nothing happens. I can prove the macro runs by adding a "display text" in the macro. The display works, however no files are copied.

How do I get error information out of the zsh script? How do I debug further?


To troubleshoot,

Under the option of the action, Make sure the Include Errors is checked
and Failure Abort Macro is unchecked, and those error if occurs will display in the Window


1 Like

Curiously that was already on. However your menu also had Include Errors ticked. For some reason my didn't. I can't imagine how that happened.

and for bonus points the error was easily found. By pasting in the command line I have used on the terminal I was the luck winner of an extra carriage return.