Gets the path to the system-wide global NPM binary directory.
()
| 116 | |
| 117 | /** Gets the path to the system-wide global NPM binary directory. */ |
| 118 | async function getNpmGlobalBinPath(): Promise<string | null> { |
| 119 | try { |
| 120 | return (await ChildProcess.spawn('npm', ['bin', '--global'], {mode: 'silent'})).stdout.trim(); |
| 121 | } catch (e) { |
| 122 | Log.debug('Could not determine NPM global binary directory. Error:', e); |
| 123 | return null; |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | /** Gets the Yarn path from the Yarn configuration if present. */ |
| 128 | async function getYarnPathFromConfigurationIfPresent(projectDir: string): Promise<string | null> { |
no outgoing calls
no test coverage detected