Skip to content

Commit 0a01fb2

Browse files
change logging and timeouts
1 parent 9a75bfa commit 0a01fb2

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/unity-editor.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ export class UnityEditor {
204204
const commandStr = `\x1b[34m${this.editorPath} ${command.args.join(' ')}\x1b[0m`;
205205
this.logger.startGroup(commandStr);
206206

207+
if (this.version.isLegacy() && process.platform === 'darwin' && process.arch === 'arm64') {
208+
throw new Error(`Cannot execute Unity ${this.version.toString()} on Apple Silicon Macs.`);
209+
}
210+
207211
if (process.platform === 'linux' &&
208212
!command.args.includes('-nographics')
209213
) {
@@ -242,7 +246,7 @@ export class UnityEditor {
242246
});
243247
}
244248

245-
if (!unityProcess?.pid) {
249+
if (!unityProcess?.pid || unityProcess.killed) {
246250
throw new Error('Failed to start Unity process!');
247251
}
248252

src/utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ export function TailLogFile(logPath: string): LogTailResult {
390390
const tailPromise = new Promise<void>((resolve, reject) => {
391391
(async () => {
392392
try {
393-
await WaitForFileToBeCreatedAndReadable(logPath, 10_000);
393+
await WaitForFileToBeCreatedAndReadable(logPath);
394394

395395
while (!logEnded) {
396396
await Delay(logPollingInterval);

0 commit comments

Comments
 (0)