|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
415 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | const pathKey = (options = {}) => {
|
|---|
| 4 | const environment = options.env || process.env;
|
|---|
| 5 | const platform = options.platform || process.platform;
|
|---|
| 6 |
|
|---|
| 7 | if (platform !== 'win32') {
|
|---|
| 8 | return 'PATH';
|
|---|
| 9 | }
|
|---|
| 10 |
|
|---|
| 11 | return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';
|
|---|
| 12 | };
|
|---|
| 13 |
|
|---|
| 14 | module.exports = pathKey;
|
|---|
| 15 | // TODO: Remove this for the next major release
|
|---|
| 16 | module.exports.default = pathKey;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.