aswi2020vldc-gitlab/templetes/node_modules/path-key/index.js @ ae1ff627
1 | 3a515b92 | cagy | 'use strict'; |
---|---|---|---|
2 | module.exports = opts => { |
||
3 | opts = opts || {}; |
||
4 | |||
5 | const env = opts.env || process.env; |
||
6 | const platform = opts.platform || process.platform; |
||
7 | |||
8 | if (platform !== 'win32') { |
||
9 | return 'PATH'; |
||
10 | }
|
||
11 | |||
12 | return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path'; |
||
13 | };
|