Skip to content

Commit b327abe

Browse files
authored
unix: Change the path where git-remote-http looks for libcurl.4.dylib (#4152)
* unix: Change the path where git-remote-http looks for libcurl.4.dylib * linter * typo
1 parent 1fb2321 commit b327abe

File tree

1 file changed

+18
-5
lines changed
  • ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/curl/tasks

1 file changed

+18
-5
lines changed

ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/curl/tasks/main.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,28 @@
155155
- ((not curl_version.stdout) or ((curl_version.stdout) and (curl_version.stdout is version_compare(curl_oldest, operator='lt', strict=True))))
156156
tags: curl
157157

158-
- name: Install curl via brew on MacOS 14 x64 (regardless if curl is already installed)
158+
- name: Install curl via brew in MacOS14 (regardless if curl is already installed)
159159
become: yes
160160
become_user: "{{ ansible_user }}"
161-
homebrew:
162-
name: curl
163-
state: latest
164-
path: "{{ homebrew_path }}"
165161
when:
166162
- ansible_distribution == "MacOSX"
167163
- ansible_distribution_major_version == "14"
168164
- ansible_architecture == "x86_64"
169165
tags: curl
166+
block:
167+
- name: Brew install curl
168+
homebrew:
169+
name: curl
170+
state: latest
171+
path: "{{ homebrew_path }}"
172+
173+
- name: Find libcurl.4.dylib library
174+
shell: ls -ld /usr/local/Cellar/curl/8.*/lib/libcurl.4.dylib | awk '{print $9}'
175+
register: libcurl_path
176+
177+
- name: Find git-remote-http executable
178+
shell: ls -ld /usr/local/Cellar/git/2.*/libexec/git-core/git-remote-http | awk '{print $9}'
179+
register: git_remote_http_path
180+
181+
- name: Change the path of the libcurl library in the git-remote-http executable
182+
shell: "install_name_tool -change /usr/lib/libcurl.4.dylib {{ libcurl_path.stdout }} {{ git_remote_http_path.stdout }}"

0 commit comments

Comments
 (0)