* Adds trusted local bins and the current Node executable directory to PATH.
( cwd: string, env: NodeJS.ProcessEnv = process.env )
| 133 | * Adds trusted local bins and the current Node executable directory to PATH. |
| 134 | */ |
| 135 | async function prependLocalBinsToEnvPath( |
| 136 | cwd: string, |
| 137 | env: NodeJS.ProcessEnv = process.env |
| 138 | ): Promise<NodeJS.ProcessEnv> { |
| 139 | const localPath = await prependLocalBinsToPath(cwd, getEnvPath(env)); |
| 140 | |
| 141 | return setEnvPath( |
| 142 | env, |
| 143 | prependPathEntries(localPath, [path.dirname(process.execPath)]) |
| 144 | ); |
| 145 | } |
| 146 | |
| 147 | /** |
| 148 | * Prepends trusted local bin directories to a PATH value. |
no test coverage detected