Skip to content

Commit e4e9214

Browse files
authored
fix: ignore non-zero exit code from simctl terminate (#127)
1 parent ff150f8 commit e4e9214

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/iphone-simulator-xcode-simctl.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,16 @@ export class XCodeSimctlSimulator extends IPhoneSimulatorNameGetter implements I
134134
}
135135
}
136136
} catch (e) {
137+
// ingore
137138
}
138139

139-
await this.simctl.terminate(deviceId, appIdentifier);
140+
try {
141+
await this.simctl.terminate(deviceId, appIdentifier);
142+
} catch (e) {
143+
// sometimes simctl can fail and return a non-zero exit code
144+
// in most cases we should be fine to ignore it and continue
145+
// todo: find cases where this may break things down the line
146+
}
140147
utils.sleep(0.5);
141148

142149
delete XCodeSimctlSimulator.stoppingApps[appKey];

0 commit comments

Comments
 (0)