2020-05-09 21:41:25 +07:00
|
|
|
import path from 'path'
|
2022-02-23 10:07:15 +07:00
|
|
|
import process from 'process'
|
2020-05-09 21:41:25 +07:00
|
|
|
import { Inputs } from '../inputs'
|
|
|
|
|
|
2021-03-23 12:42:43 +07:00
|
|
|
export const getBinDest = (inputs: Inputs): string => path.join(inputs.dest, 'node_modules', '.bin')
|
|
|
|
|
|
2020-05-09 21:41:25 +07:00
|
|
|
export const patchPnpmEnv = (inputs: Inputs): NodeJS.ProcessEnv => ({
|
|
|
|
|
...process.env,
|
2026-03-21 13:53:41 +01:00
|
|
|
PATH: path.join(getBinDest(inputs), 'bin') + path.delimiter + getBinDest(inputs) + path.delimiter + process.env.PATH,
|
2020-05-09 21:41:25 +07:00
|
|
|
})
|