You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2018/12/04 21:40:07 UTC
[cordova-paramedic] 01/03: fix exec usage
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-fix_exec
in repository https://gitbox.apache.org/repos/asf/cordova-paramedic.git
commit c268f34bd01b129f26d4586aae9c8cbe9dab5146
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Tue Dec 4 22:38:59 2018 +0100
fix exec usage
---
lib/ParamedicAppUninstall.js | 2 +-
lib/ParamedicKill.js | 4 ++--
lib/ParamedicLog.js | 2 +-
lib/ParamedicTargetChooser.js | 2 +-
lib/paramedic.js | 2 +-
lib/utils/utilities.js | 6 +++---
6 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib/ParamedicAppUninstall.js b/lib/ParamedicAppUninstall.js
index 860532b..b5d5ec4 100644
--- a/lib/ParamedicAppUninstall.js
+++ b/lib/ParamedicAppUninstall.js
@@ -83,7 +83,7 @@ ParamedicAppUninstall.prototype.executeUninstallCommand = function (uninstallCom
logger.error('Error code: ' + code);
reject();
}
- }, {silent: false, async: true});
+ });
}).timeout(60000)
.fail(function () {
logger.warn('cordova-paramedic: App uninstall timed out!');
diff --git a/lib/ParamedicKill.js b/lib/ParamedicKill.js
index 6ae8211..2aa0643 100644
--- a/lib/ParamedicKill.js
+++ b/lib/ParamedicKill.js
@@ -88,7 +88,7 @@ ParamedicKill.prototype.killTasks = function (taskNames) {
logger.info('running the following command:');
logger.info(' ' + command);
- var killTasksResult = exec(command, {silent: false, async: false });
+ var killTasksResult = exec(command);
if (killTasksResult.code !== 0) {
console.warn('WARNING: kill command returned ' + killTasksResult.code);
}
@@ -116,7 +116,7 @@ ParamedicKill.prototype.killAdbServer = function () {
logger.info('Running the following command:');
logger.info(' ' + killServerCommand);
- var killServerResult = exec(killServerCommand, {silent: false, async: false});
+ var killServerResult = exec(killServerCommand);
if (killServerResult.code !== 0) {
logger.error('Failed killing adb server with code: ' + killServerResult.code);
}
diff --git a/lib/ParamedicLog.js b/lib/ParamedicLog.js
index 0eee617..c676049 100644
--- a/lib/ParamedicLog.js
+++ b/lib/ParamedicLog.js
@@ -85,7 +85,7 @@ ParamedicLog.prototype.generateLogs = function (logCommand) {
var logFile = this.getLogFileName();
logger.info('Running Command: ' + logCommand);
- var result = exec(logCommand, {silent: true, async: false});
+ var result = exec(logCommand);
if (result.code > 0) {
logger.error('Failed to run command: ' + logCommand);
logger.error('Failure code: ' + result.code);
diff --git a/lib/ParamedicTargetChooser.js b/lib/ParamedicTargetChooser.js
index 25ed36a..7d66f8d 100644
--- a/lib/ParamedicTargetChooser.js
+++ b/lib/ParamedicTargetChooser.js
@@ -106,7 +106,7 @@ ParamedicTargetChooser.prototype.chooseTargetForWindows = function (emulator, ta
var windowsCommand = this.cli + ' run --list --emulator' + util.PARAMEDIC_COMMON_CLI_ARGS;
logger.info('cordova-paramedic: Running command: ' + windowsCommand);
- var devicesResult = exec(windowsCommand, {silent: true, async: false});
+ var devicesResult = exec(windowsCommand);
if (devicesResult.code > 0) {
logger.error('Failed to get the list of devices for windows');
return Q({target: undefined});
diff --git a/lib/paramedic.js b/lib/paramedic.js
index a567ea9..5b97657 100644
--- a/lib/paramedic.js
+++ b/lib/paramedic.js
@@ -604,7 +604,7 @@ ParamedicRunner.prototype.packageApp = function () {
shell.pushd(self.getPackageFolder());
shell.rm('-rf', self.getPackageName());
console.log('Running command: ' + zipCommand + ' in dir: ' + shell.pwd());
- exec(zipCommand, { silent: !self.config.isVerbose() }, function (code, stdout, stderr) {
+ exec(zipCommand, function (code, stdout, stderr) {
shell.popd();
if (code) {
reject('zip command returned with error code ' + code);
diff --git a/lib/utils/utilities.js b/lib/utils/utilities.js
index c83a31f..ba4e215 100644
--- a/lib/utils/utilities.js
+++ b/lib/utils/utilities.js
@@ -43,7 +43,7 @@ function countAndroidDevices() {
logger.info(' ' + listCommand);
var numDevices = 0;
- var result = exec(listCommand, {silent: false, async: false});
+ var result = exec(listCommand);
result.output.split('\n').forEach(function (line) {
if (!HEADING_LINE_PATTERN.test(line) && DEVICE_ROW_PATTERN.test(line)) {
numDevices += 1;
@@ -72,7 +72,7 @@ function getSimulatorModelId(cli, target) {
logger.info('running:');
logger.info(' ' + findSimCommand);
- var findSimResult = exec(findSimCommand, {silent: true, async: false});
+ var findSimResult = exec(findSimCommand);
if (findSimResult.code > 0) {
logger.error('Failed to find simulator we deployed to');
@@ -95,7 +95,7 @@ function getSimulatorId(findSimResult) {
logger.info('running:');
logger.info(' ' + instrCommand);
- var instrResult = exec(instrCommand, {silent: true, async: false});
+ var instrResult = exec(instrCommand);
if (instrResult.code > 0) {
logger.error('Failed to get the list of simulators');
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org