Skip to content

Commit

Permalink
fix: shelljs exec usage, part 2 (#32)
Browse files Browse the repository at this point in the history
`output` was replaced with `stdout` in shelljs 0.6.0.
  • Loading branch information
airdrummingfool committed Feb 11, 2022
1 parent e749386 commit dfbfc5f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/simctl-extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/


const shell = require('shelljs')
const path = require('path')
const fs = require('fs')
Expand All @@ -36,7 +37,7 @@ const extensions = {
const res = shell.exec(command, { silent: true })

// parse output for Xcode version
const versionMatch = /Xcode (.*)/.exec(res.output)
const versionMatch = /Xcode (.*)/.exec(res.stdout)
if (res.code !== 0 || !versionMatch) {
console.error('Unable to parse xcodebuild version.')
return
Expand All @@ -52,7 +53,7 @@ const extensions = {
console.error('Could not get device list.')
return
}
const listOutput = JSON.parse(res.output)
const listOutput = JSON.parse(res.stdout)
const device = Object.keys(listOutput.devices)
.reduce(function (acc, key) { return acc.concat(listOutput.devices[key]) }, [])
.find(function (el) { return el.udid === deviceid })
Expand Down

0 comments on commit dfbfc5f

Please sign in to comment.