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_r364460086
##########
File path: bin/templates/scripts/cordova/lib/versions.js
##########
@@ -128,15 +102,11 @@ exports.get_cocoapods_version = () => {
* or rejected in case of error
*/
exports.get_ios_sim_version = () => {
- const d = Q.defer();
- child_process.exec('ios-sim --version', (error, stdout, stderr) => {
- if (error) {
- d.reject(stderr);
- } else {
- d.resolve(stdout);
- }
- });
- return d.promise;
+ return execa('ios-sim', ['--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]