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 2019/04/16 15:01:59 UTC

[cordova-ios] branch janpio-594_deployment updated: try to use superspawn instead of cp

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

janpio pushed a commit to branch janpio-594_deployment
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git


The following commit(s) were added to refs/heads/janpio-594_deployment by this push:
     new e1f2b90  try to use superspawn instead of cp
e1f2b90 is described below

commit e1f2b905554cebba0752e99d14e0813c1c4cfd54
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Tue Apr 16 17:01:42 2019 +0200

    try to use superspawn instead of cp
---
 bin/templates/scripts/cordova/lib/run.js | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/bin/templates/scripts/cordova/lib/run.js b/bin/templates/scripts/cordova/lib/run.js
index 3759b82..9ce1cb3 100644
--- a/bin/templates/scripts/cordova/lib/run.js
+++ b/bin/templates/scripts/cordova/lib/run.js
@@ -207,11 +207,19 @@ function iossimLaunch (appPath, devicetypeid, log, exit) {
 
     var params = ['launch', appPath, '--devicetypeid', devicetypeid, '--log', log, exit];
     console.log('$ ' + f + ' ' + params.join(' '));
-    var proc = cp.spawn(f, params);
 
-    proc.stdout.on('data', (data) => {
-        console.log('ios-sim log: ' + data.toString());
-    });
+    return superspawn.spawn(f, params, { cwd: projectPath, printCommand: true, stdio: 'inherit' })
+        .progress(function (stdio) {
+            if (stdio.stderr) { 
+                console.error(stdio.stderr); 
+            }
+            if (stdio.stdout) {
+                console.log('ios-sim log: ' + data.toString());
+            }
+        })
+        .then(function(result){
+            console.log('Simulator successfully started via `ios-sim`.');
+        });
 }
 
 function listDevices () {


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