11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ciconst pathKey = (options = {}) => { 41cb0ef41Sopenharmony_ci const environment = options.env || process.env; 51cb0ef41Sopenharmony_ci const platform = options.platform || process.platform; 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci if (platform !== 'win32') { 81cb0ef41Sopenharmony_ci return 'PATH'; 91cb0ef41Sopenharmony_ci } 101cb0ef41Sopenharmony_ci 111cb0ef41Sopenharmony_ci return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path'; 121cb0ef41Sopenharmony_ci}; 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_cimodule.exports = pathKey; 151cb0ef41Sopenharmony_ci// TODO: Remove this for the next major release 161cb0ef41Sopenharmony_cimodule.exports.default = pathKey; 17