mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-24 06:08:48 +00:00
fallback to shelljs if pwd is empty (windows issue)
This commit is contained in:
parent
4b0925d425
commit
d5a21d579c
@ -284,7 +284,7 @@ class CodeGenerator {
|
|||||||
return next(null, utils.joinPath(fs.embarkPath("js/web3-1.0.min.js")));
|
return next(null, utils.joinPath(fs.embarkPath("js/web3-1.0.min.js")));
|
||||||
} else {
|
} else {
|
||||||
self.events.request("version:getPackageLocation", "web3", web3Version, function(err, location) {
|
self.events.request("version:getPackageLocation", "web3", web3Version, function(err, location) {
|
||||||
return next(null, utils.joinPath(process.env.PWD, location));
|
return next(null, utils.joinPath(utils.pwd(), location));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -51,7 +51,7 @@ function embarkPath(fileOrDir) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function dappPath() {
|
function dappPath() {
|
||||||
return process.env.PWD;
|
return utils.pwd();
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -46,7 +46,7 @@ Plugins.prototype.loadInternalPlugin = function(pluginName, pluginConfig) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Plugins.prototype.loadPlugin = function(pluginName, pluginConfig) {
|
Plugins.prototype.loadPlugin = function(pluginName, pluginConfig) {
|
||||||
var pluginPath = utils.joinPath(process.env.PWD, 'node_modules', pluginName);
|
var pluginPath = utils.joinPath(utils.pwd(), 'node_modules', pluginName);
|
||||||
var plugin = require(pluginPath);
|
var plugin = require(pluginPath);
|
||||||
|
|
||||||
var pluginWrapper = new Plugin({name: pluginName, pluginModule: plugin, pluginConfig: pluginConfig, logger: this.logger, pluginPath: pluginPath, interceptLogs: this.interceptLogs, events: this.events, config: this.config, isInternal: false});
|
var pluginWrapper = new Plugin({name: pluginName, pluginModule: plugin, pluginConfig: pluginConfig, logger: this.logger, pluginPath: pluginPath, interceptLogs: this.interceptLogs, events: this.events, config: this.config, isInternal: false});
|
||||||
|
@ -80,7 +80,7 @@ class IPFS {
|
|||||||
let currentIpfsApiVersion = require('../../../package.json').dependencies["ipfs-api"];
|
let currentIpfsApiVersion = require('../../../package.json').dependencies["ipfs-api"];
|
||||||
if (ipfsApiVersion !== currentIpfsApiVersion) {
|
if (ipfsApiVersion !== currentIpfsApiVersion) {
|
||||||
self.events.request("version:getPackageLocation", "ipfs-api", ipfsApiVersion, function(err, location) {
|
self.events.request("version:getPackageLocation", "ipfs-api", ipfsApiVersion, function(err, location) {
|
||||||
self.embark.registerImportFile("ipfs-api", utils.joinPath(process.env.PWD, location));
|
self.embark.registerImportFile("ipfs-api", utils.joinPath(utils.pwd(), location));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -63,7 +63,7 @@ class Pipeline {
|
|||||||
},
|
},
|
||||||
|
|
||||||
function changeCwd(next) {
|
function changeCwd(next) {
|
||||||
realCwd = process.env.PWD;
|
realCwd = utils.pwd();
|
||||||
process.chdir(fs.embarkPath(''));
|
process.chdir(fs.embarkPath(''));
|
||||||
next();
|
next();
|
||||||
},
|
},
|
||||||
@ -285,7 +285,7 @@ class Pipeline {
|
|||||||
return next(null, utils.joinPath(fs.embarkPath("js/web3-1.0.min.js")));
|
return next(null, utils.joinPath(fs.embarkPath("js/web3-1.0.min.js")));
|
||||||
} else {
|
} else {
|
||||||
self.events.request("version:getPackageLocation", "web3", web3Version, function(err, location) {
|
self.events.request("version:getPackageLocation", "web3", web3Version, function(err, location) {
|
||||||
return next(null, utils.joinPath(process.env.PWD, location));
|
return next(null, utils.joinPath(utils.pwd(), location));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user