Skip to content

Commit

Permalink
Merge pull request #36 from infosia/TIMOB-23181
Browse files Browse the repository at this point in the history
[TIMOB-23181] Install app for Windows 10 Mobile fails on second install
  • Loading branch information
sgtcoolguy committed Apr 12, 2016
2 parents b024c08 + 66fa35a commit 7449a32
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/wptool.js
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ function wpToolInstall(deployCmd, device, appPath, options, callback) {
}

var args = [
'install',
options.forceUnInstall ? 'uninstall' : 'install',
'-file',
appPath,
'-ip',
Expand Down Expand Up @@ -775,11 +775,21 @@ function wpToolInstall(deployCmd, device, appPath, options, callback) {

if (err == '0x80073CF9') {
callback(new Error('A debug application is already installed, please remove existing debug application'));
} else if (err == '0x80073CFB') {
// Provided package has the same identity as an already-installed package. Proceed uninstalling.
options.forceUnInstall = true;
wpToolInstall(deployCmd, device, appPath, options, callback);
} else {
callback(new Error(__('Failed to install app (code %s): %s', err, msg)));
}
} else {
callback(null, device);
// Provided package is uninstalled...proceed re-installing.
if (options.forceUnInstall) {
options.forceUnInstall = false;
wpToolInstall(deployCmd, device, appPath, options, callback);
} else {
callback(null, device);
}
}
}
});
Expand Down

0 comments on commit 7449a32

Please sign in to comment.