Before the command was not working correctly to check the calibre version since it seemed to be treating the entire string as the command. So when ' --version' was added it was breaking. I changed the format to pass the command and args as a list and it seems to work correctly.