From acb807e4588f3a9f1f5eaaf1258f78cb5aced911 Mon Sep 17 00:00:00 2001 From: Garrett Beaty Date: Fri, 28 Aug 2020 18:17:24 +0000 Subject: [PATCH] Output a newline when there are warnings and no prompt. Not outputting a newline when not prompting causes the command prompt to not appear on a new line. Change-Id: I791c829e1e0b37c9ad5d6bfdb246db4c779be020 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2380598 Auto-Submit: Garrett Beaty Reviewed-by: Josip Sokcevic Commit-Queue: Garrett Beaty --- presubmit_support.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/presubmit_support.py b/presubmit_support.py index ee2883c2a..8b006af7c 100755 --- a/presubmit_support.py +++ b/presubmit_support.py @@ -1735,6 +1735,8 @@ def DoPresubmitChecks(change, if may_prompt: presubmits_failed = not prompt_should_continue( 'Are you sure you wish to continue? (y/N): ') + else: + sys.stdout.write('\n') if json_output: # Write the presubmit results to json output