Skip to content

Commit 3320b26

Browse files
committed
don't output error to console
1 parent 817ab79 commit 3320b26

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

action.yml

+14-5
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,36 @@ runs:
1818
using: "composite"
1919
steps:
2020
- name: Check java found
21-
run: java --version
2221
id: check_java
2322
shell: bash
24-
continue-on-error: true
23+
run: |
24+
if java --version; then
25+
echo "installed=true" >> "$GITHUB_OUTPUT"
26+
else
27+
echo "installed=false" >> "$GITHUB_OUTPUT"
28+
fi
2529
2630
- name: Install java
27-
if: steps.check_java.outcome == 'failure'
31+
if: steps.check_java.outputs.installed == 'false'
2832
uses: actions/setup-java@v3
2933
with:
3034
distribution: "zulu"
3135
java-version: "17.x"
3236
cache: "gradle"
3337

3438
- name: Check flutter found
35-
run: flutter --version
3639
id: check_flutter
3740
shell: bash
3841
continue-on-error: true
42+
run: |
43+
if flutter --version; then
44+
echo "installed=true" >> "$GITHUB_OUTPUT"
45+
else
46+
echo "installed=false" >> "$GITHUB_OUTPUT"
47+
fi
3948
4049
- name: Setup flutter
41-
if: steps.check_flutter.outcome == 'failure'
50+
if: steps.check_flutter.outputs.installed == 'false'
4251
uses: subosito/flutter-action@v2
4352
with:
4453
channel: "stable"

0 commit comments

Comments
 (0)