upload_symbols: fix finding dump_syms on Windows when relying on PATH

This commit is contained in:
Nick Hastings 2024-07-07 11:11:14 -04:00
parent fccf275194
commit 02e85b3d98

View File

@ -1,4 +1,5 @@
# vim: ts=8 sts=2 sw=2 tw=99 et ft=python:
import shutil
import sys
import subprocess
import os
@ -14,6 +15,9 @@ if len(sys.argv) < 3:
SYMBOL_SERVER = os.environ['BREAKPAD_SYMBOL_SERVER']
symbol_file = sys.argv[1]
cmd_argv = sys.argv[2:]
# Find the dump_syms executable. (On Windows, subprocess.Popen doesn't use PATH unless shell=True.)
cmd_argv[0] = shutil.which(cmd_argv[0])
sys.stdout.write(' '.join(cmd_argv))
sys.stdout.write('\n')