diff --git a/utils/check_self_hosted_runner.py b/utils/check_self_hosted_runner.py index 7439bd270ef..9c2bfb1f87b 100644 --- a/utils/check_self_hosted_runner.py +++ b/utils/check_self_hosted_runner.py @@ -6,10 +6,15 @@ import subprocess def get_runner_status(target_runners, token): offline_runners = [] - cmd = ( - f'curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer {token}"' - " https://api.github.com/repos/huggingface/transformers/actions/runners" - ) + cmd = [ + "curl", + "-H", + "Accept: application/vnd.github+json", + "-H", + f"Authorization: Bearer {token}", + "https://api.github.com/repos/huggingface/transformers/actions/runners", + ] + output = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE) o = output.stdout.decode("utf-8") status = json.loads(o)