Skip to content

Commit

Permalink
subprocess without shell
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Long committed Mar 8, 2024
1 parent ac53203 commit 3128149
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions entrypoint/entrypoint/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ def set_github_output(key, value):
value = encoded

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}")
logging.info(cmd)
result = subprocess.run(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
logging.info(f"subproc stdout: {str(result.stdout)}")
logging.info(f"subproc stderr: {str(result.stderr)}")

return result.returncode

Expand Down

0 comments on commit 3128149

Please sign in to comment.