Github user robpaveza commented on a diff in the pull request:

    https://github.com/apache/cordova-windows/pull/113#discussion_r36925333
  
    --- Diff: template/cordova/lib/deployment.js ---
    @@ -194,13 +194,28 @@ AppDeployCmdTool.prototype.enumerateDevices = 
function() {
         });
     };
     
    +// Note: To account for CB-9482, we pass an extra parameter when retrying 
the call.  Be forwarned to check for that
    +// if additional parameters are added in the future.
     AppDeployCmdTool.prototype.installAppPackage = function(pathToAppxPackage, 
targetDevice, shouldLaunch, shouldUpdate, pin) {
         var command = shouldUpdate ? '/update' : '/install';
         if (shouldLaunch) {
             command += 'launch';
         }
     
    -    return run(this.path, [command, pathToAppxPackage, '/targetdevice:' + 
targetDevice.__shorthand]);
    +    var that = this;
    +    var result = run(this.path, [command, pathToAppxPackage, 
'/targetdevice:' + targetDevice.__shorthand]);
    +    if (targetDevice.type === 'emulator' && arguments.length < 6) {
    +        result = result.then(null, function(e) {
    +            // CB-9482: AppDeployCmd also reports E_INVALIDARG during this 
process.  If so, try to repeat.
    +            if (e.code === 2147942487) {
    --- End diff --
    
    OK, I'll do so in the updated PR, but I don't see that `var E_INVALIDARG = 
...; if (e.code === E_INVALIDARG)` is necessarily better.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to