mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-09 13:36:14 +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")));
|
||||
} else {
|
||||
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() {
|
||||
return process.env.PWD;
|
||||
return utils.pwd();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
@ -46,7 +46,7 @@ Plugins.prototype.loadInternalPlugin = 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 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"];
|
||||
if (ipfsApiVersion !== currentIpfsApiVersion) {
|
||||
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) {
|
||||
realCwd = process.env.PWD;
|
||||
realCwd = utils.pwd();
|
||||
process.chdir(fs.embarkPath(''));
|
||||
next();
|
||||
},
|
||||
@ -285,7 +285,7 @@ class Pipeline {
|
||||
return next(null, utils.joinPath(fs.embarkPath("js/web3-1.0.min.js")));
|
||||
} else {
|
||||
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