Skip to content

Commit

Permalink
Fix shelljs exec return object usage. (#31)
Browse files Browse the repository at this point in the history
In shelljs v0.6.0 (shelljs/shelljs@8a7f7ce), the `output` property was changed to `stdout`.
  • Loading branch information
airdrummingfool authored Feb 9, 2022
1 parent 14c2efe commit e54fc06
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions simctl.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ exports = module.exports = {
var obj = shell.exec(command, {silent: true});

if (obj.code !== 0) {
obj.output = 'simctl was not found.\n';
obj.output += 'Check that you have Xcode 8.x installed:\n';
obj.output += '\txcodebuild --version\n';
obj.output += 'Check that you have Xcode 8.x selected:\n';
obj.output += '\txcode-select --print-path\n';
obj.stdout = 'simctl was not found.\n';
obj.stdout += 'Check that you have Xcode 8.x installed:\n';
obj.stdout += '\txcodebuild --version\n';
obj.stdout += 'Check that you have Xcode 8.x selected:\n';
obj.stdout += '\txcode-select --print-path\n';
}

return obj;
Expand Down Expand Up @@ -168,7 +168,7 @@ exports = module.exports = {

if (obj.code === 0) {
try {
obj.json = JSON.parse(obj.output);
obj.json = JSON.parse(obj.stdout);
} catch (err) {
console.error(err.stack);
}
Expand Down

0 comments on commit e54fc06

Please sign in to comment.