From 198838599c5d4eaaa3bd68ff903925eeb4a09da9 Mon Sep 17 00:00:00 2001 From: Jack Neus Date: Mon, 25 Oct 2021 22:38:44 +0000 Subject: 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 Reviewed-by: Mike Frysinger --- subcmds/init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'subcmds/init.py') 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. if standalone_manifest: if is_new: manifest_name = 'default.xml' - manifest_data = fetch.fetch_file(opt.manifest_url) + manifest_data = fetch.fetch_file(opt.manifest_url, verbose=opt.verbose) dest = os.path.join(m.worktree, manifest_name) os.makedirs(os.path.dirname(dest), exist_ok=True) with open(dest, 'wb') as f: -- cgit v1.2.3-54-g00ecf