From 80430d73aee1fe591bea1475ba3b7fc30c67dfc2 Mon Sep 17 00:00:00 2001 From: Leonard Grey Date: Thu, 15 Dec 2022 17:11:01 -0500 Subject: [PATCH] upload_system_symbols: Fix sym-upload-v2 when uploading dumped symbols This was previously setting the right upload servers too late to use them when uploading previously dumped symbols (the `--upload-from` use case) Bug: 1400770 Change-Id: If5bb749707b9f0a181585619f30ec9cb011db5ed Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4111102 Reviewed-by: Robert Sesek --- .../mac/upload_system_symbols/upload_system_symbols.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tools/mac/upload_system_symbols/upload_system_symbols.go b/src/tools/mac/upload_system_symbols/upload_system_symbols.go index 03acb16c..8f5c773f 100644 --- a/src/tools/mac/upload_system_symbols/upload_system_symbols.go +++ b/src/tools/mac/upload_system_symbols/upload_system_symbols.go @@ -113,6 +113,11 @@ func main() { flag.Parse() log.SetFlags(0) + // If `apiKey` is set, we're using the v2 protocol. + if len(*apiKey) > 0 { + uploadServers = uploadServersV2 + } + var uq *UploadQueue if *uploadOnlyPath != "" { @@ -149,10 +154,6 @@ func main() { defer os.RemoveAll(p) } } - // If `apiKey` is set, we're using the v2 protocol. - if len(*apiKey) > 0 { - uploadServers = uploadServersV2 - } dq := StartDumpQueue(*systemRoot, dumpPath, uq) dq.Wait()