Describe the bug
"Execute Shell script/task" action does not seem to process umlauts in the scripts correctly. I encountered it when trying to use SwitchAudioSource command for switching my current audio output device. I have a German macbook and device, which represents headphones is called "Externe Kopfhörer" and there is no easy way to change the device name in OSX.
I can run the command from both zsh and /bin/bash just fine, but BTT gets me the following output:
SwitchAudioSource -s "Externe Kopfhörer"
Could not find an audio device named "Externe Kopfhörer" of type output. Nothing was changed.
Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
- Type of Mac: MacBook Pro (15-inch, 2019)
- macOS version: 10.15.4
- BetterTouchTool version: 3.373
Additional information (e.g. StackTraces, related issues, screenshots, workarounds, etc.):
Tried playing around with locale settings (which didn't help), because as I said, the script works just fine from both zsh and bash, so it has to be something about how BTT processes/passes it down, and yeah, the command works fine in BTT for audio device without an umlaut in the name
Also just tried executing the script in the clean bash, to verify it's not environment-related:
env -i bash --norc --noprofile
if /usr/local/Cellar/switchaudio-osx/1.0.0/bin/SwitchAudioSource -c | grep -q "MacBook Pro Lautsprecher"; then /usr/local/Cellar/switchaudio-osx/1.0.0/bin/SwitchAudioSource -s "Externe Kopfhörer"; else /usr/local/Cellar/switchaudio-osx/1.0.0/bin/SwitchAudioSource -s "MacBook Pro Lautsprecher"; fi
output audio device set to "Externe Kopfhörer"
which worked correctly.