set PWD directly instead of overriding chdir
This commit is contained in:
parent
6da4f7527e
commit
0b3572f564
|
@ -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) => {
|
||||
// Set PWD to CWD since Windows doesn't have a value for PWD
|
||||
if (!process.env.PWD) {
|
||||
process.env.PWD = process.cwd();
|
||||
}
|
||||
realChdir(...args);
|
||||
};
|
||||
|
||||
let version = require('../package.json').version;
|
||||
|
||||
|
|
|
@ -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) => {
|
||||
// Set PWD to CWD since Windows doesn't have a value for PWD
|
||||
if (!process.env.PWD) {
|
||||
process.env.PWD = process.cwd();
|
||||
}
|
||||
realChdir(...args);
|
||||
};
|
||||
|
||||
class ProcessWrapper {
|
||||
|
||||
|
|
Loading…
Reference in New Issue