Comparing version 2.6.1 to 2.6.2
@@ -10,6 +10,8 @@ var Command, Parser, Protocol, debug; | ||
Command = (function() { | ||
var RE_SQUOT; | ||
var RE_ESCAPE, RE_SQUOT; | ||
RE_SQUOT = /'/g; | ||
RE_ESCAPE = /([$`\\!"])/g; | ||
function Command(connection) { | ||
@@ -42,2 +44,11 @@ this.connection = connection; | ||
Command.prototype._escapeCompat = function(arg) { | ||
switch (typeof arg) { | ||
case 'number': | ||
return arg; | ||
default: | ||
return '"' + arg.toString().replace(RE_ESCAPE, '\\$1') + '"'; | ||
} | ||
}; | ||
return Command; | ||
@@ -44,0 +55,0 @@ |
@@ -17,3 +17,3 @@ var Command, InstallCommand, Protocol, | ||
InstallCommand.prototype.execute = function(apk) { | ||
this._send("shell:pm install -r '" + apk + "'"); | ||
this._send("shell:pm install -r " + (this._escapeCompat(apk))); | ||
return this.parser.readAscii(4).then((function(_this) { | ||
@@ -20,0 +20,0 @@ return function(reply) { |
{ | ||
"name": "adbkit", | ||
"version": "2.6.1", | ||
"version": "2.6.2", | ||
"description": "A pure Node.js client for the Android Debug Bridge.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
215198
4310