The following command works fine from the CLI:
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r /path/coverage.xml
When I pass the same command to subprocess with shell=False, I get the following error:
FileNotFoundError: [Errno 2] No such file or directory: 'bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r /path/coverage.xml'
with shell=True, I get this error:
/bin/sh: -c: line 0: syntax error near unexpected token `('
To me, it looks like the entire command is being treated as a path when shell is False, and I don't understand why subprocess thinks there is a syntax error when shell=True.
How can I get this command to work from Python?