cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimir-kotikov <...@git.apache.org>
Subject [GitHub] cordova-android pull request: CB-9557 Fixes apk install failure wh...
Date Wed, 26 Aug 2015 18:23:51 GMT
Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/209#discussion_r38016661
  
    --- Diff: bin/templates/cordova/lib/device.js ---
    @@ -96,10 +96,15 @@ module.exports.install = function(target, buildResults) {
         }).then(function(resolvedTarget) {
             var apk_path = build.findBestApkForArchitecture(buildResults, resolvedTarget.arch);
             var launchName = appinfo.getActivityName();
    +        var pkgName = appinfo.getPackageName();
             console.log('Using apk: ' + apk_path);
    -        console.log('Installing app on device...');
    -        var cmd = 'adb -s ' + resolvedTarget.target + ' install -r "' + apk_path + '"';
    -        return exec(cmd, os.tmpdir())
    +        console.log('Uninstalling ' + pkgName + ' from device...');
    +        return exec('adb -s ' + resolvedTarget.target + ' uninstall ' + pkgName, os.tmpdir())
    --- End diff --
    
    No. Even if `adb uninstall` fails to uninstall an app, it exits with error code 0, and
thus `exec` promise is always resolved in this case.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message