mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 01:42:58 +08:00
[CB-4996] Fix paths with spaces while launching on emulator and device
This commit is contained in:
parent
4e1156e083
commit
8783cf03b2
2
bin/templates/cordova/lib/device.js
vendored
2
bin/templates/cordova/lib/device.js
vendored
@ -64,7 +64,7 @@ module.exports.install = function(target) {
|
|||||||
var apk_path = build.get_apk();
|
var apk_path = build.get_apk();
|
||||||
launchName = appinfo.getActivityName();
|
launchName = appinfo.getActivityName();
|
||||||
console.log('Installing app on device...');
|
console.log('Installing app on device...');
|
||||||
var cmd = 'adb -s ' + target + ' install -r ' + apk_path;
|
var cmd = 'adb -s ' + target + ' install -r "' + apk_path + '"';
|
||||||
return exec(cmd);
|
return exec(cmd);
|
||||||
}).then(function(output) {
|
}).then(function(output) {
|
||||||
if (output.match(/Failure/)) return Q.reject('ERROR: Failed to install apk to device: ' + output);
|
if (output.match(/Failure/)) return Q.reject('ERROR: Failed to install apk to device: ' + output);
|
||||||
|
2
bin/templates/cordova/lib/emulator.js
vendored
2
bin/templates/cordova/lib/emulator.js
vendored
@ -305,7 +305,7 @@ module.exports.install = function(target) {
|
|||||||
|
|
||||||
console.log('Installing app on emulator...');
|
console.log('Installing app on emulator...');
|
||||||
var apk_path = build.get_apk();
|
var apk_path = build.get_apk();
|
||||||
return exec('adb -s ' + target + ' install -r ' + apk_path);
|
return exec('adb -s ' + target + ' install -r "' + apk_path + '"');
|
||||||
}).then(function(output) {
|
}).then(function(output) {
|
||||||
if (output.match(/Failure/)) {
|
if (output.match(/Failure/)) {
|
||||||
return Q.reject('Failed to install apk to emulator: ' + output);
|
return Q.reject('Failed to install apk to emulator: ' + output);
|
||||||
|
Loading…
Reference in New Issue
Block a user