Permalink
Browse files

Merge pull request #340 from bootstraponline/fix_apk

APK fixes
  • Loading branch information...
2 parents 29295e6 + 3e9a89d commit c169d9796f922e58b64c574baa70081bf43ca3b1 @jlipps jlipps committed Mar 27, 2013
Showing with 7 additions and 7 deletions.
  1. +7 −7 uiautomator/adb.js
View
@@ -688,7 +688,7 @@ ADB.prototype.uninstallApk = function(pkg, cb) {
};
ADB.prototype.installApk = function(apk, cb) {
- var cmd = this.adbCmd + " install -r " + apk;
+ var cmd = this.adbCmd + ' install -r "' + apk + '"';
this.debug(cmd);
exec(cmd,function(err, stdout) {
if (err) {
@@ -783,19 +783,19 @@ ADB.prototype.installApp = function(cb) {
} else { cb(null); }
},
function(cb) {
+ if (installClean) {
+ me.debug("Installing clean apk");
+ me.installApk(me.cleanAPK, function(err) { if (err) return cb(err); return cb(null); });
+ } else { cb(null); }
+ },
+ function(cb) {
// App is already installed so reset it.
if (!installApp) {
me.runFastReset(function(err) {
if (err) return cb(err);
return cb(null);
});
} else { cb(null); }
- },
- function(cb) {
- if (installClean) {
- me.debug("Installing clean apk");
- me.installApk(me.cleanAPK, function(err) { if (err) return cb(err); return cb(null); });
- } else { cb(null); }
}
],
// Top level callback.

0 comments on commit c169d97

Please sign in to comment.