I want to stop the TeamCity On-Premise Deployment Pipeline from executing if the Quality Gate in SonarQube On-Premise has failed. I have tried the custom scripts mentioned in the links: https://stackoverflow.com/questions/52530153/quality-gate-failure-in-sonarqube-does-not-fail-the-build-in-teamcity & https://gist.github.com/ramingar/52c6417501ef147765de7452615b30f3 by using Command Line runner in the Build Step in TeamCity On-Premise Deployment Pipeline.
For the custom script mentioned in https://stackoverflow.com/questions/52530153/quality-gate-failure-in-sonarqube-does-not-fail-the-build-in-teamcity , error "the term 'jq' is not recognized as the name of a cmdlet" is shown & for https://gist.github.com/ramingar/52c6417501ef147765de7452615b30f3 the
error "ERR_Count is not internal or external command" is shown.
Please let me know the resolution for these errors.