Shell Script on M1 Mac/Monterey

Hello everybody,
after transferring from an intel based mac on Catalina to an M1 with Monterey, I have problems with one Hazel Rule including a shell script. The script ocrs a PNG after renaming it.

The match works perfectly fine, the renaming works perfectly fine, the shell script errors.
The Log tells me:
Running the shell command by hand works perfectly fine too.
I ran
So I guess the problem might has to do with user rights? But hazel and terminal have full disc access.
Would be glad if you can help.
Best regards
after transferring from an intel based mac on Catalina to an M1 with Monterey, I have problems with one Hazel Rule including a shell script. The script ocrs a PNG after renaming it.

- Code: Select all
Rename with pattern ...
Run Shell Script embedded script: tesseract "$1" "$1" -l deu+eng PDF
The match works perfectly fine, the renaming works perfectly fine, the shell script errors.
The Log tells me:
- Code: Select all
Error processing shell script on file /Users/name/Documents/Screenshots/screenshot.png.
Shellscript exited with non-successful status code: 1
Running the shell command by hand works perfectly fine too.
I ran
- Code: Select all
"$1" > textfile.txt
- Code: Select all
tesseract "/Users/name/Documents/Screenshots/screenshot.png" "/Users/name/Documents/Screenshots/screenshot.png" -l deu+eng PDF
So I guess the problem might has to do with user rights? But hazel and terminal have full disc access.
Would be glad if you can help.
Best regards