MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / shutdownSimulatorIfNeeded

Function shutdownSimulatorIfNeeded

scripts/integration/cli.mjs:1977–1986  ·  view source on GitHub ↗
(udid)

Source from the content-addressed store, hash-verified

1975}
1976
1977function shutdownSimulatorIfNeeded(udid) {
1978 try {
1979 return simdeckJson(["shutdown", udid]);
1980 } catch (error) {
1981 if (String(error?.message ?? error).includes("current state: Shutdown")) {
1982 return { ok: true, udid, alreadyShutdown: true };
1983 }
1984 throw error;
1985 }
1986}
1987
1988function assertRoots(payload, label) {
1989 assertJson(payload, label);

Callers 2

mainFunction · 0.70

Calls 1

simdeckJsonFunction · 0.70

Tested by

no test coverage detected