Comparing version 2.0.11 to 2.0.12
@@ -18,3 +18,3 @@ (function() { | ||
InstallCommand.prototype.execute = function(apk) { | ||
this._send("shell:pm install -r '" + apk + "' 2>/dev/null"); | ||
this._send("shell:pm install -r '" + apk + "'"); | ||
return this.parser.readAscii(4).then((function(_this) { | ||
@@ -24,13 +24,14 @@ return function(reply) { | ||
case Protocol.OKAY: | ||
return _this.parser.readAscii(7).then(function(reply) { | ||
switch (reply) { | ||
case 'Success': | ||
_this.connection.end(); | ||
return true; | ||
case 'Failure': | ||
throw new Error("" + apk + " could not be installed"); | ||
break; | ||
default: | ||
return _this.parser.unexpected(reply, "'Success' or 'Failure'"); | ||
return _this.parser.searchLine(/^(Success|Failure \[(.*?)\])$/).then(function(match) { | ||
var code, err; | ||
if (match[1] === 'Success') { | ||
return true; | ||
} else { | ||
code = match[2]; | ||
err = new Error("" + apk + " could not be installed [" + code + "]"); | ||
err.code = code; | ||
throw err; | ||
} | ||
})["finally"](function() { | ||
return _this.parser.readAll(); | ||
}); | ||
@@ -37,0 +38,0 @@ case Protocol.FAIL: |
{ | ||
"name": "adbkit", | ||
"version": "2.0.11", | ||
"version": "2.0.12", | ||
"description": "A pure Node.js client for the Android Debug Bridge.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -371,3 +371,3 @@ # adbkit | ||
* **callback(err)** Optional. Use this or the returned `Promise`. | ||
- **err** `null` when successful, `Error` otherwise. | ||
- **err** `null` when successful, `Error` otherwise. It may have a `.code` property containing the error code reported by the device. | ||
* Returns: `Promise` | ||
@@ -374,0 +374,0 @@ * Resolves with: `true` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
180251
3487