Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

Commit

Permalink
[#418] reenabled build using try/catch with cordova platform
Browse files Browse the repository at this point in the history
  • Loading branch information
lorinbeer committed Oct 16, 2014
1 parent 07ff299 commit ef8d2df
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/phonegap/build.js
Expand Up @@ -6,7 +6,6 @@ var Command = require('./util/command'),
project = require('./util/project'),
platforms = require('./util/platform'),
cordova = require('cordova-lib').cordova,
// cdvsupports = cordova.platform.supports;
util = require('util');


Expand Down Expand Up @@ -89,19 +88,18 @@ BuildCommand.prototype.execute = function(options, callback) {

self.phonegap.emit('log', PG_STR.msgdet[0], platform.human, PG_STR.msgdet[1]);

/*
// detect the platform support
// cordova.platform.supports('.', platform.local).then(function() {
try {
cordova.platform('.', platform.local, null);
// invoke local or remote build
var env = 'local';
self.phonegap.emit('log', PG_STR.useenv[0], env, PG_STR.useenv[1]);
self.phonegap[env].build(options, callback);
// }, function (e) {
} catch (e) {
var env = 'remote';
// emit a non-exiting message to stderr, incase user wants to react to local build failure
self.phonegap.emit('error', e);
self.phonegap.emit('log', PG_STR.useenv[0], env, PG_STR.useenv[1]);
self.phonegap[env].build(options, callback);
// });
*/
};
};

0 comments on commit ef8d2df

Please sign in to comment.