diff --git a/lib/index.js b/lib/index.js index a2698080..f98c1782 100644 --- a/lib/index.js +++ b/lib/index.js @@ -3,14 +3,10 @@ const constants = require('./constants'); require('colors'); -// Override process.chdir so that we have a partial-implementation PWD for Windows -const realChdir = process.chdir; -process.chdir = (...args) => { - if (!process.env.PWD) { - process.env.PWD = process.cwd(); - } - realChdir(...args); -}; +// Set PWD to CWD since Windows doesn't have a value for PWD +if (!process.env.PWD) { + process.env.PWD = process.cwd(); +} let version = require('../package.json').version; diff --git a/lib/process/processWrapper.js b/lib/process/processWrapper.js index f4eda695..eee920e5 100644 --- a/lib/process/processWrapper.js +++ b/lib/process/processWrapper.js @@ -1,14 +1,10 @@ const constants = require('../constants'); const Events = require('./eventsWrapper'); -// Override process.chdir so that we have a partial-implementation PWD for Windows -const realChdir = process.chdir; -process.chdir = (...args) => { - if (!process.env.PWD) { - process.env.PWD = process.cwd(); - } - realChdir(...args); -}; +// Set PWD to CWD since Windows doesn't have a value for PWD +if (!process.env.PWD) { + process.env.PWD = process.cwd(); +} class ProcessWrapper {