Github user nikhilkh commented on a diff in the pull request: https://github.com/apache/cordova-medic/pull/47#discussion_r29375447 --- Diff: bin/medic.js --- @@ -39,9 +65,109 @@ var argv = optimist .argv; // helpers +function killTasks(taskNames) { + + if (!taskNames || taskNames.length < 1) { + console.warn("no tasks to kill"); + return; + } + + if (isWindows()) { + var cli = "taskkill /F"; + var args = taskNames.map(function (name) { return "/IM \"" + name + "\""; }); + } else { + var cli = "killall"; + var args = taskNames.map(function (name) { return "\"" + name + "\""; }); + } + + var command = cli + " " + args.join(" "); + medicLog("running the following command:"); + medicLog(" " + command); + + shelljs.exec(command, {silent: false, async: true}, function (returnCode, output) { + if (returnCode !== 0) { + console.warn("WARNING: kill command returned " + returnCode); --- End diff -- Does it make sense to print the output also here - along with the return code?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org