Skip to content

Commit

Permalink
Fix PATHs to include default Homebrew prefix (NO_JIRA)
Browse files Browse the repository at this point in the history
Homebrew has shifted from installing to `/usr/local/` to `/opt/homebrew/`. Depending on Homebrew version we might be looking at either, so include both in the `PATH` environment var for `shell` tasks using Homebrew-installed tools.
  • Loading branch information
florianpiesche authored Jun 4, 2024
1 parent 5ac498e commit 6a96955
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasks/Darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
"ccdc-3rdparty-macos-xcode-installers/"
/tmp/xcode-{{ xcode_version }}.xip
environment:
PATH: "/usr/local/bin:/usr/bin"
PATH: "/opt/homebrew/bin:/usr/local/bin:{{ ansible_env.PATH }}"
CI: "true"
JFROG_CLI_OFFER_CONFIG: "false"
args:
creates: /tmp/xcode-{{ xcode_version }}.xip

- name: Install Xcode v{{ xcode_version }} # noqa: name[template] command-instead-of-shell
ansible.builtin.shell:
cmd: /usr/local/bin/xcodes install {{ xcode_version }} --path /tmp/xcode-{{ xcode_version }}.xip --experimental-unxip
cmd: xcodes install {{ xcode_version }} --path /tmp/xcode-{{ xcode_version }}.xip --experimental-unxip
args:
creates: "/Applications/Xcode-{{ xcode_version }}.app"
environment:
PATH: /usr/local/bin:{{ ansible_env.PATH }}
PATH: "/opt/homebrew/bin:/usr/local/bin:{{ ansible_env.PATH }}"
become: true

- name: Set CLI tools path # noqa: no-changed-when
Expand Down

0 comments on commit 6a96955

Please sign in to comment.