Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

feat(process.env.path): Use platform specific path casing if present #30

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ let PATH = 'PATH'
// windows calls it's path 'Path' usually, but this is not guaranteed.
if (process.platform === 'win32') {
PATH = 'Path'
Object.keys(process.env).forEach(function (e) {
if (e.match(/^PATH$/i)) {
PATH = e
}
})
if (!process.env[PATH]) {
Object.keys(process.env).forEach(function (e) {
if (e.match(/^PATH$/i)) {
PATH = e
}
})
}
}

function logid (pkg, stage) {
Expand Down