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/11/24 19:52:55 UTC

[cordova-paramedic] branch johanlantz-child_process_output created (now 40abb42)

This is an automated email from the ASF dual-hosted git repository.

janpio pushed a change to branch johanlantz-child_process_output
in repository https://gitbox.apache.org/repos/asf/cordova-paramedic.git.


      at 40abb42  Ensure output is posted to console after child process finishes (#5)

This branch includes the following new commits:

     new 40abb42  Ensure output is posted to console after child process finishes (#5)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-paramedic] 01/01: Ensure output is posted to console after child process finishes (#5)

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch johanlantz-child_process_output
in repository https://gitbox.apache.org/repos/asf/cordova-paramedic.git

commit 40abb428d8565aa718cdeabc94ce62b08f42cea3
Author: johanlantz <il...@gmail.com>
AuthorDate: Fri Jun 22 10:36:01 2018 +0200

    Ensure output is posted to console after child process finishes (#5)
---
 lib/paramedic.js | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/lib/paramedic.js b/lib/paramedic.js
index a386bb7..a748674 100644
--- a/lib/paramedic.js
+++ b/lib/paramedic.js
@@ -332,8 +332,18 @@ ParamedicRunner.prototype.runLocalTests = function () {
         if (self.config.getPlatformId() !== util.BROWSER) {
             return execPromise(command);
         }
-        runProcess = cp.exec(command, function () {
-            // a precaution not to try to kill some other process
+        // We do not wait for the child process to finish, server connects when deployed and ready. 
+        runProcess = cp.exec(command, (error, stdout, stderr) => {     
+            if (error) {
+                // This won't show up until the process completes:
+                console.log('[ERROR]: Running cordova run failed');
+
+                console.log(stdout);
+                console.log(stderr);
+                reject(error);
+            }
+            console.log(stdout);
+            console.log(stderr);
             runProcess = null;
         });
     })


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org