Hi,

I filed this new issue:
https://issues.apache.org/jira/browse/CB-5605

cheers
Axel


CB-5605:
My app uses two custom plugins.
I want to add firefoxos as a platform.
When I issue a
cordova platform add firefoxos
install.js:68 fails with the message
"Cannot access currentVersion of null"

I guess my custom plugins' plugin.xml are wrong...

Anyway I think that install.js should not crash here.
I have no idea why engines[i] is null for some i.

-Axel

Maybe this code is a fix:
function checkEngines(engines) {
for(var i = 0; i < engines.length; i++) {
var engine = engines[i];
if(engine===null)
{ return Q.reject(new Error('Plugin doesn\'t support this project')); }

else {
if(semver.satisfies(engine.currentVersion, engine.minVersion) || 
engine.currentVersion == null)
{ // engine ok! }

else
{ return Q.reject(new Error('Plugin doesn\'t support this project\'s 
'+engine.name+' version. '+engine.name+': ' + engine.currentVersion + ', failed 
version requirement: ' + engine.minVersion)); }

}
}

return Q(true);
}

Although I never see the no-support output

Reply via email to