mirror of
https://github.com/atom/atom.git
synced 2026-01-14 17:38:03 -05:00
Before we run script/bootstrap on the macOS build, the preceding build step installs npm 6.2.0 as the global npm version. It installs npm at `/usr/local/bin/npm`. However, a _different_ version of npm appears earlier in the PATH. The PATH looks like this: ``` /Users/vsts/hostedtoolcache/node/8.9.3/x64/bin: /usr/local/lib/ruby/gems/2.6.0/bin: /usr/local/opt/ruby/bin: /usr/local/opt/curl/bin: /usr/local/bin: /usr/local/sbin: /Users/vsts/bin: /Users/vsts/.yarn/bin: /usr/local/go/bin: /Users/vsts/Library/Android/sdk/tools: /Users/vsts/Library/Android/sdk/platform-tools: /Users/vsts/Library/Android/sdk/ndk-bundle: /Library/Frameworks/Mono.framework/Versions/Current/Commands: /usr/bin: /bin: /usr/sbin: /sbin: /Users/vsts/.azcopy ``` There's an npm executable at /Users/vsts/hostedtoolcache/node/8.9.3/x64/bin/npm. To get the build to use the global version of npm, this commit puts /usr/local/bin at the beginning of the PATH.