diff --git a/lib/core/engine.js b/lib/core/engine.js index 6aa0fc5d..40a2f7be 100644 --- a/lib/core/engine.js +++ b/lib/core/engine.js @@ -140,9 +140,7 @@ class Engine { async.waterfall([ function getWeb3Version(next) { - console.log('Waiting for web3 version'); self.events.request("version:get:web3", function(web3Version) { - console.log('Web3 version', web3Version); next(null, web3Version); }); }, @@ -221,7 +219,6 @@ class Engine { communicationConfig: self.config.communicationConfig, events: self.events }); - console.log('LISTEN TO COMMANDS'); codeGenerator.listenToCommands(); codeGenerator.buildEmbarkJS(function() { self.events.emit('code-generator-ready'); diff --git a/lib/pipeline/pipeline.js b/lib/pipeline/pipeline.js index e697ee60..56748945 100644 --- a/lib/pipeline/pipeline.js +++ b/lib/pipeline/pipeline.js @@ -3,6 +3,7 @@ const async = require('async'); const utils = require('../utils/utils.js'); const webpack = require("webpack"); const constants = require('../constants'); +const File = require('../core/file'); require("babel-preset-react"); require("babel-preset-es2015"); @@ -11,6 +12,15 @@ require("babel-preset-es2017"); let pipeline; +// 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); +}; + class Pipeline { constructor(options) { @@ -73,6 +83,7 @@ class Pipeline { // limit:1 due to issues when downloading required files such as web3.js async.mapLimit(files, 1, function(file, fileCb) { + file = new File(file); // Re-instantiate a File as through the process, we lose its prototype self.log("reading " + file.filename); if (file.filename.indexOf('.js') >= 0) {