fix package name listener
This commit is contained in:
parent
1c38f3fb89
commit
7e38a239b7
|
@ -25,11 +25,10 @@ class SolcW {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.events.request("version:get:solc", function(solcVersion) {
|
this.events.request("version:get:solc", function(solcVersion) {
|
||||||
self.logger.info("detected version is " + solcVersion);
|
|
||||||
if (solcVersion === currentSolcVersion) {
|
if (solcVersion === currentSolcVersion) {
|
||||||
solcProcess.send({action: 'loadCompiler', solcLocation: 'solc'});
|
solcProcess.send({action: 'loadCompiler', solcLocation: 'solc'});
|
||||||
} else {
|
} else {
|
||||||
self.events.request("version:getPackageLocation:solc", solcVersion, function(err, location) {
|
self.events.request("version:getPackageLocation", "solc", solcVersion, function(err, location) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return done(err);
|
return done(err);
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,13 +53,11 @@ class LibraryManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
listenToCommandsToGetLibrary() {
|
listenToCommandsToGetLibrary() {
|
||||||
// TODO: generalize to any lib
|
|
||||||
let libName = "solc";
|
|
||||||
let npm = new Npm({logger: this.embark.logger});
|
let npm = new Npm({logger: this.embark.logger});
|
||||||
this.embark.events.setCommandHandler('version:getPackageLocation:' + libName, (version, cb) => {
|
this.embark.events.setCommandHandler('version:getPackageLocation', (libName, version, cb) => {
|
||||||
npm.getPackageVersion(libName, version, false, false, cb);
|
npm.getPackageVersion(libName, version, false, false, cb);
|
||||||
});
|
});
|
||||||
this.embark.events.setCommandHandler('version:getPackageContent:' + libName, (version, cb) => {
|
this.embark.events.setCommandHandler('version:getPackageContent', (libName, version, cb) => {
|
||||||
npm.getPackageVersion(libName, version, false, true, cb);
|
npm.getPackageVersion(libName, version, false, true, cb);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue