SSH connection to device in local mode fails

I want to access my devices in local mode through SSH from the CLI on my Windows 10 computer however i get the following error:

λ balena local ssh 192.168.1.49
? Select a container /local-app (cf524c5d4a6)
sh: $(if [ -f /usr/bin/balena ]; then echo "balena"; else echo "docker"; fi): No such file or directory
Connection to 192.168.1.49 closed.

It is the same for every container on the device. Does anybody know how to resolve this?