Skip to content

Commit 77be02f

Browse files
Run yarn linking only when yarn is in homebrew packages, remove from linked packages
Co-authored-by: paolomainardi <8747+paolomainardi@users.noreply.github.com>
1 parent ad86de3 commit 77be02f

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

ansible/macos/macos/base.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,16 @@
130130

131131
- name: Link yarn with conflict resolution
132132
command: brew link --overwrite yarn
133-
when: "'yarn' in all_linked_packages"
133+
when: "'yarn' in all_homebrew_packages"
134134
become: false
135135
ignore_errors: yes
136136

137137
- name: Link required packages
138138
community.general.homebrew:
139139
name: "{{ item }}"
140140
state: linked
141-
loop: "{{ all_linked_packages | difference(['yarn']) }}"
142-
when: all_linked_packages | difference(['yarn']) | length > 0
141+
loop: "{{ all_linked_packages }}"
142+
when: all_linked_packages | length > 0
143143
become: false
144144

145145
- name: Run brew doctor

config/packages/all-packages.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ homebrew_packages:
6868
- yarn
6969
- yarn-completion
7070

71-
linked_packages:
72-
- yarn
71+
linked_packages: []
7372

7473
# Removed packages/taps
7574
removed_homebrew_packages:

0 commit comments

Comments
 (0)