Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Made the licenses script output all problems #44223

Merged
merged 4 commits into from
Aug 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ci/licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual fix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we put set -e in many of our bash scripts, I think it could be helpful to add a comment here explaining why it shouldn't go here, maybe linking to the issue.

# 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.
Expand Down Expand Up @@ -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.
Expand All @@ -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

Expand Down