fix build process on windows
This commit is contained in:
parent
5a91b2d44a
commit
f37b09a371
|
@ -289,6 +289,7 @@ class CodeGenerator {
|
|||
});
|
||||
},
|
||||
function getImports(web3Location, next) {
|
||||
web3Location = web3Location.replace(/\\/g, '/'); // Import paths must always have forward slashes
|
||||
code += "\nimport Web3 from '" + web3Location + "';\n";
|
||||
code += "\nimport web3 from 'Embark/web3';\n";
|
||||
next();
|
||||
|
|
|
@ -3,6 +3,15 @@ let async = require('async');
|
|||
|
||||
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);
|
||||
};
|
||||
|
||||
let Engine = require('./core/engine.js');
|
||||
|
||||
let version = require('../package.json').version;
|
||||
|
|
|
@ -288,6 +288,7 @@ class Pipeline {
|
|||
});
|
||||
},
|
||||
function getImports(web3Location, next) {
|
||||
web3Location = web3Location.replace(/\\/g, '/'); // Import paths must always have forward slashes
|
||||
code += "\nimport Web3 from '" + web3Location + "';\n";
|
||||
|
||||
code += "\n if (typeof web3 !== 'undefined') {";
|
||||
|
|
Loading…
Reference in New Issue