You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2016/10/08 01:14:45 UTC
[4/6] android commit: Did a try/catch to deal with the unit tests vs
actual project environment, code duplication is needed because of builderEnv
Did a try/catch to deal with the unit tests vs actual project environment, code duplication is needed because of builderEnv
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/6418add8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/6418add8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/6418add8
Branch: refs/heads/master
Commit: 6418add83d048cf7e2ff7a1a9f723fea41abfe72
Parents: 7d26c51
Author: Joe Bowser <bo...@apache.org>
Authored: Thu Oct 6 14:45:26 2016 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Fri Oct 7 18:14:36 2016 -0700
----------------------------------------------------------------------
bin/templates/cordova/Api.js | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/6418add8/bin/templates/cordova/Api.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/Api.js b/bin/templates/cordova/Api.js
index 74549fe..b7411dc 100644
--- a/bin/templates/cordova/Api.js
+++ b/bin/templates/cordova/Api.js
@@ -354,13 +354,24 @@ 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);
- })
- .then(function () {
- return require('./lib/prepare').clean.call(self, cleanOptions);
- });
+ .then(function () {
+ return require('./lib/build').runClean.call(self, 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);
+ });
+ }
};
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org