raphinesse commented on a change in pull request #763: refactor: replace 
superspawn & child_process with execa
URL: https://github.com/apache/cordova-ios/pull/763#discussion_r364460018
 
 

 ##########
 File path: bin/templates/scripts/cordova/lib/versions.js
 ##########
 @@ -111,15 +89,11 @@ exports.get_ios_deploy_version = () => {
  *                           or rejected in case of error
  */
 exports.get_cocoapods_version = () => {
-    const d = Q.defer();
-    child_process.exec('pod --version', (error, stdout, stderr) => {
-        if (error) {
-            d.reject(stderr);
-        } else {
-            d.resolve(stdout);
-        }
-    });
-    return d.promise;
+    return execa('pod', ['--version'])
+        .then(
+            ({ stdout }) => stdout,
+            ({ stderr }) => stderr
 
 Review comment:
   ```suggestion
               ({ stderr }) => Promise.reject(stderr)
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to