Skip to content

Commit 69177f1

Browse files
authored
feat!: restructured spawn method (#59)
1. Removed 'waitForDebugger' spawn param. (Moved to 'options') 2. Removed 'arch' spawn param. (Moved to 'options') 3. Added param 'options' for the spawn options. Valid Options: - waitForDebugger (boolean) - arch (string)
1 parent e72f987 commit 69177f1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

simctl.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,21 +125,21 @@ module.exports = {
125125
return spawnSync('xcrun', args)
126126
},
127127

128-
spawn: function (waitForDebugger, arch, device, pathToExecutable, argv) {
128+
spawn: function (device, pathToExecutable, argv = [], options = {}) {
129129
const args = ['simctl', 'spawn']
130130

131-
if (waitForDebugger) {
131+
if (options.waitForDebugger) {
132132
args.push('--wait-for-debugger')
133133
}
134-
135-
if (arch) {
136-
args.push(`--arch="${arch}"`)
134+
if (options.arch) {
135+
args.push(`--arch=${options.arch}`)
137136
}
138137

139138
args.push(device)
140139
args.push(pathToExecutable)
140+
args.push(...argv)
141141

142-
return spawnSync('xcrun', args.concat(argv))
142+
return spawnSync('xcrun', args)
143143
},
144144

145145
list: function (options) {

0 commit comments

Comments
 (0)