mirror of https://github.com/embarklabs/embark.git
getWeb3Location should use require.resolve() for "version:get:web3" event
This commit is contained in:
parent
a622f22dcd
commit
13e21702d2
|
@ -289,7 +289,7 @@ class CodeGenerator {
|
||||||
function getWeb3Location(next) {
|
function getWeb3Location(next) {
|
||||||
self.events.request("version:get:web3", function(web3Version) {
|
self.events.request("version:get:web3", function(web3Version) {
|
||||||
if (web3Version === "1.0.0-beta") {
|
if (web3Version === "1.0.0-beta") {
|
||||||
return next(null, fs.embarkPath("node_modules/web3"));
|
return next(null, require.resolve("web3"));
|
||||||
}
|
}
|
||||||
self.events.request("version:getPackageLocation", "web3", web3Version, function(err, location) {
|
self.events.request("version:getPackageLocation", "web3", web3Version, function(err, location) {
|
||||||
return next(null, fs.dappPath(location));
|
return next(null, fs.dappPath(location));
|
||||||
|
@ -350,7 +350,7 @@ class CodeGenerator {
|
||||||
function getWeb3Location(next) {
|
function getWeb3Location(next) {
|
||||||
self.events.request("version:get:web3", function(web3Version) {
|
self.events.request("version:get:web3", function(web3Version) {
|
||||||
if (web3Version === "1.0.0-beta") {
|
if (web3Version === "1.0.0-beta") {
|
||||||
return next(null, utils.joinPath(fs.embarkPath("node_modules/web3")));
|
return next(null, require.resolve("web3"));
|
||||||
}
|
}
|
||||||
self.events.request("version:getPackageLocation", "web3", web3Version, function(err, location) {
|
self.events.request("version:getPackageLocation", "web3", web3Version, function(err, location) {
|
||||||
return next(null, fs.dappPath(location));
|
return next(null, fs.dappPath(location));
|
||||||
|
|
Loading…
Reference in New Issue