INNER CODE UNIT · Python
run_cmd
jacobdjwilson/awesome-annual-security-reports · .github/scripts/apply-triage-label.py:70
def run_cmd(cmd: str) -> None:
"""Runs command ignoring expected idempotent errors (e.g. label already exists or not on issue)."""
try:
subprocess.run(
cmd,
shell=True,
check=True,
capture_output=True,
text=True,
encoding="utf-8",
)
except subprocess.CalledProcessError:
pass
def main() -> int:
issue_number = os.environ.get("ISSUE_NUMBER")
label = os.environ.get("LABEL")