Skip to content

Commit

Permalink
testing with subprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Long committed Mar 8, 2024
1 parent 595515e commit ac53203
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions entrypoint/entrypoint/orchestrator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import subprocess
import sys

from entrypoint import installer
Expand Down Expand Up @@ -38,11 +39,12 @@ def set_github_output(key, value):
encoded = base64.b64encode(compressed_contents).decode()
value = encoded

ret = os.system(f'echo "{key}={value}" >> "$GITHUB_OUTPUT"')
if ret != 0:
logging.error(f"unable to set output for '{key}' - exit code {ret}")
cmd = ['echo', f"{key}={value}", ">>", "$GITHUB_OUTPUT"]
result = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
logging.info(f"subproc stdout: {result.stdout}")
logging.info(f"subproc stderr: {result.stderr}")

return ret
return result.returncode


def download_install_sbomgen(sbomgen_version: str, install_dst: str) -> bool:
Expand Down

0 comments on commit ac53203

Please sign in to comment.