Skip to content

Commit

Permalink
Use builder scripts to run the commands
Browse files Browse the repository at this point in the history
  • Loading branch information
TwistedTwigleg committed May 4, 2023
1 parent 463ad17 commit d4d7800
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .builder/actions/aws_crt_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -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...")
Expand All @@ -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)
Expand Down

0 comments on commit d4d7800

Please sign in to comment.