You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/04/17 03:43:50 UTC

[GitHub] [cordova-ios] dpogue commented on a change in pull request #596: More logging for simulator selection and deployment

dpogue commented on a change in pull request #596: More logging for simulator selection and deployment
URL: https://github.com/apache/cordova-ios/pull/596#discussion_r276069503
 
 

 ##########
 File path: bin/templates/scripts/cordova/lib/run.js
 ##########
 @@ -200,12 +201,22 @@ function startSim (appPath, target) {
     return iossimLaunch(appPath, 'com.apple.CoreSimulator.SimDeviceType.' + target, logPath, '--exit');
 }
 
-function iossimLaunch (app_path, devicetypeid, log, exit) {
+function iossimLaunch (appPath, devicetypeid, log, exit) {
     var f = path.resolve(path.dirname(require.resolve('ios-sim')), 'bin', 'ios-sim');
-    var proc = cp.spawn(f, ['launch', app_path, '--devicetypeid', devicetypeid, '--log', log, exit]);
-    proc.stdout.on('data', (data) => {
-        console.log(data.toString());
-    });
+    var params = ['launch', appPath, '--devicetypeid', devicetypeid, '--log', log, exit];
+
+    return superspawn.spawn(f, params, { cwd: projectPath, printCommand: true, stdio: 'pipe' })
+        .progress(function (stdio) {
+            if (stdio.stderr) {
+                console.error(stdio.stderr);
+            }
+            if (stdio.stdout) {
+                console.log('ios-sim log: ' + stdio.stdout);
 
 Review comment:
   Should these use `console.log` directly, or go through `events.emit('log', '...')`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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