aswi2020vldc-gitlab/templetes/node_modules/path-key/index.js @ 9bb1e829
1 |
'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 |
};
|