From 63dd4081873fc9a59af8b6b61b25e58aee80248d Mon Sep 17 00:00:00 2001 From: Ramil Minibaev Date: Mon, 4 Apr 2022 17:05:42 +0300 Subject: [PATCH] Fix Xcode CLT path if both CLT & Xcode os installed --- tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 30faaa7..8cc4075 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -7,6 +7,11 @@ set_fact: xcode_installed: "{{ xcode_app.stdout.find('Xcode') != -1 }}" +- name: Set Xcode command line tools path if Xcode is installed + become: true + shell: xcode-select -s "{{ xcode_app.stdout }}" + when: xcode_installed + - name: Get Installed Xcode version shell: xcodebuild -version | head -n1 | cut -d " " -f 2 register: xcode_app_output