diff --git a/roles/ensure-bazel/tasks/main.yaml b/roles/ensure-bazel/tasks/main.yaml index 28f0d9d69..3c5c52bcf 100644 --- a/roles/ensure-bazel/tasks/main.yaml +++ b/roles/ensure-bazel/tasks/main.yaml @@ -1,9 +1,12 @@ - name: Check version of bazel - shell: bazel --version | grep -Eo '([0-9]+\.)+[0-9]+' - ignore_errors: yes + shell: | + set -o pipefail + bazel --version | grep -Eo '([0-9]+\.)+[0-9]+' + failed_when: false register: installed_bazel_version -- debug: msg="Current installed Bazel version is {{ installed_bazel_version.stdout }}" +- debug: + msg: "Current installed Bazel version is {{ installed_bazel_version.stdout }}" - name: Download and install Bazel if needed include_tasks: install-bazel.yaml