summaryrefslogtreecommitdiffstats
path: root/subcmds/init.py
diff options
context:
space:
mode:
authorJack Neus <jackneus@google.com>2021-10-25 22:38:44 +0000
committerJack Neus <jackneus@google.com>2021-10-26 22:18:28 +0000
commit198838599c5d4eaaa3bd68ff903925eeb4a09da9 (patch)
tree2c7f8e448acb0881397f97a71e205b613aa747e5 /subcmds/init.py
parent282d0cae8913e9d20f526e7fb2633bb4e2a21fbf (diff)
downloadgit-repo-198838599c5d4eaaa3bd68ff903925eeb4a09da9.tar.gz
fetch: Fix stderr handling for gsutil
Previously gsutil stderr was getting piped into stdout, which yields bad results if there are non-fatal warnings in stderr. Additionally, we should fail outright if gsutil fails (by adding `check = True`) rather than fail later on when we try to sync to a manifest that is in fact just a stderr dump. BUG=none TEST=manual runs with bad gs urls Change-Id: Id71791d0c3f180bd0601ef2c783a8e8e4afa8f59 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/321935 Tested-by: Jack Neus <jackneus@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds/init.py')
-rw-r--r--subcmds/init.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/subcmds/init.py b/subcmds/init.py
index 853cbe68..a3f3241a 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -298,7 +298,7 @@ to update the working directory files.
298 if standalone_manifest: 298 if standalone_manifest:
299 if is_new: 299 if is_new:
300 manifest_name = 'default.xml' 300 manifest_name = 'default.xml'
301 manifest_data = fetch.fetch_file(opt.manifest_url) 301 manifest_data = fetch.fetch_file(opt.manifest_url, verbose=opt.verbose)
302 dest = os.path.join(m.worktree, manifest_name) 302 dest = os.path.join(m.worktree, manifest_name)
303 os.makedirs(os.path.dirname(dest), exist_ok=True) 303 os.makedirs(os.path.dirname(dest), exist_ok=True)
304 with open(dest, 'wb') as f: 304 with open(dest, 'wb') as f: