From 87979d9700c4d10ad8380ce7b5a5e8d4eb0f33b3 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Tue, 1 Aug 2023 12:16:44 -0700 Subject: [PATCH] Made the licenses script output all problems (flutter/engine#44223) fixes: https://github.com/flutter/flutter/issues/131680 verified the behavior in https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8773943493296876561/+/u/test:_licenses_check/stdout [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- engine/src/flutter/ci/licenses.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engine/src/flutter/ci/licenses.sh b/engine/src/flutter/ci/licenses.sh index 8d6e2c6093..c38b081269 100755 --- a/engine/src/flutter/ci/licenses.sh +++ b/engine/src/flutter/ci/licenses.sh @@ -4,7 +4,9 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -set -e +# Do not exit when a non-zero return value is encountered to output all errors. +# See: https://github.com/flutter/flutter/issues/131680 +# set -e shopt -s nullglob # Needed because if it is set, cd may print the path it changed to. @@ -65,7 +67,7 @@ dart --version # Runs the tests for the license script. function run_tests() ( cd "$SRC_DIR/flutter/tools/licenses" - find -name "*_test.dart" | xargs -n 1 dart --enable-asserts + find . -name "*_test.dart" | xargs -n 1 dart --enable-asserts ) # Collects the license information from the repo. @@ -91,7 +93,7 @@ function verify_licenses() ( cd "$SRC_DIR" # These files trip up the script on Mac OS X. - find . -name ".DS_Store" -exec rm {} \; + find . -name ".DS_Store" -exec rm -f {} \; collect_licenses