mirror of https://github.com/embarklabs/embark.git
set PWD directly instead of overriding chdir
This commit is contained in:
parent
6da4f7527e
commit
0b3572f564
12
lib/index.js
12
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;
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
Loading…
Reference in New Issue