Skip to content

Commit 2b30544

Browse files
FatmeFatme
authored andcommitted
fix: use correct spawn method in order to fix livesync
`childProcess.spawn` is blocking method and waits for close event to resolve the promise. Actually we'll never received `close` event because we want to read log file all the time. So use `require("child_process").spawn` in order to fix livesync command.
1 parent 87dac2f commit 2b30544

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/iphone-simulator-xcode-simctl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export class XCodeSimctlSimulator extends IPhoneSimulatorNameGetter implements I
170170
}
171171
} else {
172172
const logFilePath = path.join(osenv.home(), "Library", "Logs", "CoreSimulator", deviceId, "system.log");
173-
this.deviceLogChildProcess = childProcess.spawn("tail", ['-f', '-n', '1', logFilePath]);
173+
this.deviceLogChildProcess = child_process.spawn("tail", ['-f', '-n', '1', logFilePath]);
174174
fulfillSafe();
175175
}
176176

0 commit comments

Comments
 (0)