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>