From 0bde65ddac048c95d3ca4d4df50e9d3784566957 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 16 Sep 2021 18:37:47 -0400 Subject: [PATCH] fixed a small conductor messaging bug (#90229) * fixed a small messaging bug * forgot to remove a s --- dev/conductor/lib/next.dart | 15 +++++++++++---- dev/conductor/test/next_test.dart | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/dev/conductor/lib/next.dart b/dev/conductor/lib/next.dart index 2379ff818b..4cb356d50e 100644 --- a/dev/conductor/lib/next.dart +++ b/dev/conductor/lib/next.dart @@ -137,7 +137,11 @@ void runNext({ if (unappliedCherrypicks.isEmpty) { stdio.printStatus('All engine cherrypicks have been auto-applied by the conductor.\n'); } else { - stdio.printStatus('There were ${unappliedCherrypicks.length} cherrypicks that were not auto-applied.'); + if (unappliedCherrypicks.length == 1) { + stdio.printStatus('There was ${unappliedCherrypicks.length} cherrypick that was not auto-applied.'); + } else { + stdio.printStatus('There were ${unappliedCherrypicks.length} cherrypicks that were not auto-applied.'); + } stdio.printStatus('These must be applied manually in the directory ' '${state.engine.checkoutPath} before proceeding.\n'); } @@ -264,9 +268,12 @@ void runNext({ } else if (unappliedCherrypicks.isEmpty) { stdio.printStatus('All framework cherrypicks were auto-applied by the conductor.'); } else { - stdio.printStatus( - 'There were ${unappliedCherrypicks.length} cherrypicks that were not auto-applied.', - ); + if (unappliedCherrypicks.length == 1) { + stdio.printStatus('There was ${unappliedCherrypicks.length} cherrypick that was not auto-applied.',); + } + else { + stdio.printStatus('There were ${unappliedCherrypicks.length} cherrypicks that were not auto-applied.',); + } stdio.printStatus( 'These must be applied manually in the directory ' '${state.framework.checkoutPath} before proceeding.\n', diff --git a/dev/conductor/test/next_test.dart b/dev/conductor/test/next_test.dart index 2c2eede3ee..afdcadc9ed 100644 --- a/dev/conductor/test/next_test.dart +++ b/dev/conductor/test/next_test.dart @@ -751,7 +751,7 @@ void main() { ); expect( stdio.stdout, - contains('There were 1 cherrypicks that were not auto-applied'), + contains('There was 1 cherrypick that was not auto-applied'), ); expect( stdio.stdout,