From d4d7800e3f3fd29a9d314f5bb6afeba3ab50de5f Mon Sep 17 00:00:00 2001 From: Noah Beard Date: Thu, 4 May 2023 09:51:08 -0400 Subject: [PATCH] Use builder scripts to run the commands --- .builder/actions/aws_crt_python.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.builder/actions/aws_crt_python.py b/.builder/actions/aws_crt_python.py index fa462cd1f..125d366bd 100644 --- a/.builder/actions/aws_crt_python.py +++ b/.builder/actions/aws_crt_python.py @@ -17,8 +17,7 @@ class AWSCrtPython(Builder.Action): def try_to_upgrade_pip(self, env): did_upgrade = False try: - cmd = [self.python, '-m', 'pip', 'install', '--upgrade', '--force-reinstall', 'pip'] - env.shell.exec(*cmd, check=True, quiet=True) + Builder.Script([self.python, '-m', 'pip', 'install', '--upgrade', '--force-reinstall', 'pip']).run(env) did_upgrade = True except Exception: print("Could not update pip via normal pip upgrade. Next trying via package manager...") @@ -35,8 +34,8 @@ def try_to_upgrade_pip(self, env): # Source: https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables if (os.getenv("GITHUB_ACTIONS") is not None): try: - cmd = [self.python, '-m', 'pip', 'install', '--upgrade', '--ignore-installed', 'pip'] - env.shell.exec(*cmd, check=True, quiet=True) + Builder.Script([self.python, '-m', 'pip', 'install', '--upgrade', + '--ignore-installed', 'pip']).run(env) except Exception as ex: print("Could not update pip via ignore install! Something is terribly wrong!") raise (ex)