mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
Did a try/catch to deal with the unit tests vs actual project environment, code duplication is needed because of builderEnv
This commit is contained in:
parent
7d26c51da6
commit
6418add83d
11
bin/templates/cordova/Api.js
vendored
11
bin/templates/cordova/Api.js
vendored
@ -354,6 +354,7 @@ Api.prototype.run = function(runOptions) {
|
||||
*/
|
||||
Api.prototype.clean = function(cleanOptions) {
|
||||
var self = this;
|
||||
try {
|
||||
return require('./lib/check_reqs').run()
|
||||
.then(function () {
|
||||
return require('./lib/build').runClean.call(self, cleanOptions);
|
||||
@ -361,6 +362,16 @@ Api.prototype.clean = function(cleanOptions) {
|
||||
.then(function () {
|
||||
return require('./lib/prepare').clean.call(self, cleanOptions);
|
||||
});
|
||||
}
|
||||
catch (err) {
|
||||
return require('../../lib/check_reqs').run()
|
||||
.then(function () {
|
||||
return require('./lib/build').runClean.call(self, cleanOptions);
|
||||
})
|
||||
.then(function () {
|
||||
return require('./lib/prepare').clean.call(self, cleanOptions);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user