Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Nov 19, 2023
1 parent 1170e87 commit 93797b2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/win-ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ def query_process(cmd):
if plat == 'amd64' and 'PROGRAMFILES(x86)' not in os.environ:
os.environ['PROGRAMFILES(x86)'] = os.environ['PROGRAMFILES'] + ' (x86)'
result = {}
popen = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
try:
popen = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True)
except FileNotFoundError as err:
raise SystemExit(f'Failed to execute: {cmd!r} with error: {err}')
try:
stdout, stderr = popen.communicate()
if popen.wait() != 0:
Expand All @@ -127,6 +130,7 @@ def query_process(cmd):

def query_vcvarsall():
vcvarsall = distutils_vcvars()
print('Querying vcvars:', vcvarsall)
return query_process('"%s" %s & set' % (vcvarsall, plat))


Expand Down

0 comments on commit 93797b2

Please sign in to comment.