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

fix: Write to all possible cases of PATH variables on Windows #17

Merged
merged 2 commits into from
May 16, 2018
Merged
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
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ function lifecycle_ (pkg, stage, wd, opts, env, cb) {

if (env[PATH]) pathArr.push(env[PATH])
env[PATH] = pathArr.join(process.platform === 'win32' ? ';' : ':')
if (process.platform === 'win32') {
env.path = env.PATH = env.Path = env[PATH]
}

var packageLifecycle = pkg.scripts && pkg.scripts.hasOwnProperty(stage)

Expand Down