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) {
|
||||
self.logger.info("detected version is " + solcVersion);
|
||||
if (solcVersion === currentSolcVersion) {
|
||||
solcProcess.send({action: 'loadCompiler', solcLocation: 'solc'});
|
||||
} else {
|
||||
self.events.request("version:getPackageLocation:solc", solcVersion, function(err, location) {
|
||||
self.events.request("version:getPackageLocation", "solc", solcVersion, function(err, location) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
|
|
|
@ -53,13 +53,11 @@ class LibraryManager {
|
|||
}
|
||||
|
||||
listenToCommandsToGetLibrary() {
|
||||
// TODO: generalize to any lib
|
||||
let libName = "solc";
|
||||
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);
|
||||
});
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue