You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/12/23 19:51:10 UTC

cordova-lib git commit: CB-7803 Allow adding any platform on any host OS (close #126)

Repository: cordova-lib
Updated Branches:
  refs/heads/master be3cd898c -> 3a254646e


CB-7803 Allow adding any platform on any host OS (close #126)


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/3a254646
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/3a254646
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/3a254646

Branch: refs/heads/master
Commit: 3a254646e7b53be011ee38b1f867ec6ac0bf633b
Parents: be3cd89
Author: Edna Morales <ed...@gmail.com>
Authored: Mon Dec 1 14:19:09 2014 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Dec 23 13:50:35 2014 -0500

----------------------------------------------------------------------
 cordova-lib/src/cordova/compile.js  | 3 +++
 cordova-lib/src/cordova/platform.js | 4 ++--
 cordova-lib/src/cordova/run.js      | 3 +++
 3 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3a254646/cordova-lib/src/cordova/compile.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/compile.js b/cordova-lib/src/cordova/compile.js
index d878601..1362441 100644
--- a/cordova-lib/src/cordova/compile.js
+++ b/cordova-lib/src/cordova/compile.js
@@ -24,6 +24,7 @@
 var path              = require('path'),
     cordova_util      = require('./util'),
     HooksRunner            = require('../hooks/HooksRunner'),
+    events        = require('../events'),
     superspawn        = require('./superspawn');
 
 // Returns a promise.
@@ -41,6 +42,8 @@ module.exports = function compile(options) {
     });
     ret = ret.then(function() {
         return hooksRunner.fire('after_compile', options);
+    }, function(error) {
+        events.emit('log', 'ERROR building one of the platforms: ' + error + '\nYou may not have the required environment or OS to build this project');
     });
     return ret;
 };

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3a254646/cordova-lib/src/cordova/platform.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/platform.js b/cordova-lib/src/cordova/platform.js
index bd22bf7..5c754e3 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -57,9 +57,9 @@ function add(hooksRunner, projectRoot, targets, opts) {
 
     for(var i= 0 ; i< targets.length; i++){
         if ( !hostSupports(targets[i]) ) {
-            msg = 'Applications for platform ' + targets[i] +
+            msg = 'WARNING: Applications for platform ' + targets[i] +
                   ' can not be built on this OS - ' + process.platform + '.';
-            return Q.reject( new CordovaError(msg));
+            events.emit('log', msg);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3a254646/cordova-lib/src/cordova/run.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/run.js b/cordova-lib/src/cordova/run.js
index cb361fc..cea286b 100644
--- a/cordova-lib/src/cordova/run.js
+++ b/cordova-lib/src/cordova/run.js
@@ -24,6 +24,7 @@
 var cordova_util      = require('./util'),
     path              = require('path'),
     HooksRunner            = require('../hooks/HooksRunner'),
+    events            = require('../events'),
     superspawn        = require('./superspawn'),
     Q                 = require('q');
 
@@ -45,5 +46,7 @@ module.exports = function run(options) {
         }));
     }).then(function() {
         return hooksRunner.fire('after_run', options);
+    }, function(error) {
+        events.emit('log', 'ERROR running one or more of the platforms: ' + error + '\nYou may not have the required environment or OS to run this project');
     });
 };


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org