Be more permissive in copying crash files, and log the output. Bug: https://github.com/flutter/flutter/issues/154308 Change-Id: I9207629fc75698c10fdf3fa96b48df1278a95c30 Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/59560 Reviewed-by: Zach Anderson <zra@google.com> Reviewed-by: Christopher Fujino <fujino@google.com> Commit-Queue: Matan Lurey <matanl@google.com>
diff --git a/recipe_modules/build_util/resources/copy_crash.sh b/recipe_modules/build_util/resources/copy_crash.sh old mode 100644 new mode 100755 index e8a2783..86fdd25 --- a/recipe_modules/build_util/resources/copy_crash.sh +++ b/recipe_modules/build_util/resources/copy_crash.sh
@@ -7,8 +7,17 @@ # bot's default location. set -e +# The first argument is the destination directory to copy any crash files to. destination=$1 + +# Crash files are stored in this directory. +# See https://github.com/flutter/flutter/issues/154308#issuecomment-2318512303. origin="$HOME/Library/Logs/DiagnosticReports/" -if [ -f "$origin"/llvm_*.crash ]; then - cp "$origin"/llvm_*.crash "$destination"/. -fi \ No newline at end of file + +crash_files=( "$origin"/*.crash ) +if [ ${#crash_files[@]} -gt 0 ]; then + cp "${crash_files[@]}" "$destination"/. + echo "Crash files copied successfully." +else + echo "No crash files found." +fi