(Also, I saved the results from echo $PATH in terminal to my ENV_PATH variable in keyboard maestro to try and remove any discrepancies between the two environments)
The quotes didn't change anything unfortunately. However, I tried removing jq from the comamnd and echoing out the results of wget specifically into a window and the results I got were interesting:
Spider mode enabled. Check if remote file exists. --2021-11-24 17:08:28-- https://SITEDOMAIN/ Resolving SITEDOMAIN (SITEDOMAIN)... 162.159.134.42 Connecting to SITEDOMAIN (SITEDOMAIN)|162.159.134.42|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Remote file exists and could contain links to other resources -- retrieving. --2021-11-24 17:08:29-- https://SITEDOMAIN/ Reusing existing connection to SITEDOMAIN:443. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] index.html.tmp.tmp: Bad file descriptor Cannot write to âindex.html.tmp.tmpâ (Success). Found no broken links.
Specifically this portion:
Bad file descriptor Cannot write to âindex.html.tmp.tmpâ (Success).
I believe this is most likely a permissions issue from KM's side, but I'm not sure where to start in solving this issue.
Hey there, sorry about that. I didn't know you could export macros as a file, so I didn't really know what you meant at first. I've attached the macro and the shell script to this comment. These both include the changes I made to debug the last comment. I'm also using ggrep and gsed to ensure use of the linux version of those commands in mac environments. Unfortunately I can't include .sh files to this forum, so I'm just pasting it here.
The vanilla shell instance used by Keyboard Maestro inherits no paths or other variables from the completely separate shell instance used by Terminal.app.
So, for example, any specially installed commands (wget for example ?) may run without a full path in Terminal.app, but will need either a full path, or an explicitly set PATH variable, in the KM instance of the shell.