-
I'm trying to develop an automator service on Mac so I can refight-click on a file and generate a sharelink for that file. I've got the path to the file, I can truncate it in AppleScript and add the current date + one week, and then try and run it through a 'do shell script' command, and I get an error from Maestral:
Yet when I take the command that I try to run in do shell script and paste it directly into terminal, the command works absolutely fine. Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Yes, I've seen this before. We use click for most of the command line interface and click requires a UTF-8 encoding of the environment. This is typically set by environment variables such as It looks like the environment in which automator runs has a ASCII encoding configured. There probably is a way to change that but I'm not particularly familiar with automator or AppleScript. |
Beta Was this translation helpful? Give feedback.
-
Thanks Sam - this is helpful, and I set off to find scrips that would convert output from an AppleScript action in automator. In the course of testing those, something seems to have happened to the CLI. I've uninstalled it, and reinstalled it, and when installed, whatever command is given seems to execute no actions, even in terminal. I just try basic stuff like maestral ls and I just get another % prompt... |
Beta Was this translation helpful? Give feedback.
-
I had the same problem, with AppleScript. My workaround is to run the shell scripts from a Keyboard Maestro macro, which can be embedded in my AppleScript script. Not so elegant but it works perfectly well! |
Beta Was this translation helpful? Give feedback.
Yes, I've seen this before. We use click for most of the command line interface and click requires a UTF-8 encoding of the environment. This is typically set by environment variables such as
LC_CTYPE=UTF-8
in your command line by default on macOS.It looks like the environment in which automator runs has a ASCII encoding configured. There probably is a way to change that but I'm not particularly familiar with automator or AppleScript.