Yang Guo | 4fd355c | 2019-09-19 10:59:03 +0200 | [diff] [blame] | 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 | }; |