From 855def5b0be654f498fc944a7024bb797a720b76 Mon Sep 17 00:00:00 2001 From: Davide Di Stefano Date: Fri, 10 Dec 2021 14:17:50 +0100 Subject: [PATCH] Defaults to Xcode 8 when version check fails When Xcode is misconfigured, xcodebuild -version command returns an error. --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 30faaa7..1bad617 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -8,7 +8,7 @@ xcode_installed: "{{ xcode_app.stdout.find('Xcode') != -1 }}" - name: Get Installed Xcode version - shell: xcodebuild -version | head -n1 | cut -d " " -f 2 + shell: (xcodebuild -version 2> /dev/null || echo "8.0") | head -n1 | cut -d " " -f 2 register: xcode_app_output when: xcode_installed changed_when: false