From 5c5f9e3b920e3966f9806127f04948d6b51baf73 Mon Sep 17 00:00:00 2001 From: Socheat Sok Date: Mon, 16 Dec 2024 14:48:27 +0700 Subject: [PATCH] The action is no longer exit when `dart` or `flutter` binary not found but warning instead --- action.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/action.sh b/action.sh index 5d7e160..6bb0ef5 100755 --- a/action.sh +++ b/action.sh @@ -5,10 +5,11 @@ if [[ -z "${ACTIONS_ID_TOKEN_REQUEST_URL}" ]] && [[ -z "${ACTIONS_ID_TOKEN_REQUE exit 0 fi -if [ ! "$(command -v dart)" ] && [ ! "$(command -v flutter)" ]; then - echo "::error::Flutter is not installed," - echo "See https://github.com/flutter-actions/setup-flutter for more details." - exit 1 +if [ ! "$(command -v dart)" ]; then + echo '::warning title=Dark is not installed::Please use "uses: dart-lang/setup-dart@v1" or "uses: flutter-actions/setup-flutter@v4" to setup Dart or Flutter SDK.' +fi +if [ ! "$(command -v flutter)" ]; then + echo '::warning title=Flutter is not installed::Please use "uses: flutter-actions/setup-flutter@v4" to setup Dart & Flutter SDK.' fi INPUT_GITHUB_OIDC_AUDIENCE="https://pub.dev"