[PR #6138/3d67f518 backport][stable-6] Fix Yarn global not working without explicit executable path (#6141)

Fix Yarn global not working without explicit executable path (#6138)

* Fix Yarn global not working without explicit executable path

* changelog fragment

* fix formatting and add test

* oops

(cherry picked from commit 3d67f51824)

Co-authored-by: Sargun Vohra <sargun.vohra@gmail.com>
This commit is contained in:
patchback[bot] 2023-03-04 10:21:50 +01:00 committed by GitHub
commit 8efbd8172c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 7 deletions

View file

@ -108,6 +108,15 @@
that:
- yarn_install_old_package is changed
- name: 'Again but without explicit executable path'
yarn:
path: '{{ remote_tmp_dir }}'
name: left-pad
version: 1.1.0
state: present
environment:
PATH: '{{ yarn_bin_path }}:{{ node_bin_path }}:{{ ansible_env.PATH }}'
- name: 'Upgrade old package'
yarn:
path: '{{ remote_tmp_dir }}'