You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by db...@apache.org on 2015/08/12 03:40:33 UTC

cordova-windows git commit: CB-9482: Modifies the deployment code to account for problems with emulators, which are currently blocking the CI from executing. Modifying the uninstall function to never fail appears to unblock the CI and allow installation

Repository: cordova-windows
Updated Branches:
  refs/heads/master 45377ee89 -> 050910c84


CB-9482: Modifies the deployment code to account for problems with
emulators, which are currently blocking the CI from executing.  Modifying
the uninstall function to never fail appears to unblock the CI and allow
installation to emulators to continue unhindered.


Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/050910c8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/050910c8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/050910c8

Branch: refs/heads/master
Commit: 050910c84144935f78e40b93f6ab7193f2d866ef
Parents: 45377ee
Author: Rob Paveza <Ro...@microsoft.com>
Authored: Tue Aug 11 16:40:29 2015 -0700
Committer: Dmitry Blotsky <dm...@gmail.com>
Committed: Tue Aug 11 18:33:49 2015 -0700

----------------------------------------------------------------------
 template/cordova/lib/deployment.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/050910c8/template/cordova/lib/deployment.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/deployment.js b/template/cordova/lib/deployment.js
index 4e8b799..29db338 100644
--- a/template/cordova/lib/deployment.js
+++ b/template/cordova/lib/deployment.js
@@ -204,7 +204,13 @@ AppDeployCmdTool.prototype.installAppPackage = function(pathToAppxPackage, targe
 };
 
 AppDeployCmdTool.prototype.uninstallAppPackage = function(packageInfo, targetDevice) {
-    return run(this.path, ['/uninstall', packageInfo, '/targetdevice:' + targetDevice.__shorthand]);
+    // CB-9482: AppDeployCmd reports failure when targeting an emulator, but actually succeeds
+    //  Further calls in the promise chain then are not executed (such as installAppPackage) because
+    //  of the failure reported here.  By ensuring that this function always reports a success
+    //  state, it allows install to proceed.  (Install will fail if there is a legitimate 
+    //  uninstall failure such as due to no device).  
+    var assureSuccess = function() {};
+    return run(this.path, ['/uninstall', packageInfo, '/targetdevice:' + targetDevice.__shorthand]).then(assureSuccess, assureSuccess);
 };
 
 AppDeployCmdTool.prototype.launchApp = function(packageInfo, targetDevice) {


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