From 32a12e12a79dd26a37050ea3cbdccfff51988a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=9F=E6=88=98?= <40414978+PatriceJiang@users.noreply.github.com> Date: Tue, 29 Aug 2023 17:37:16 +0800 Subject: [PATCH] report error when check xcode failed (#16126) --- scripts/native-pack-tool/source/platforms/ios.ts | 2 +- scripts/native-pack-tool/source/platforms/mac-os.ts | 2 +- scripts/native-pack-tool/source/platforms/mac.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/native-pack-tool/source/platforms/ios.ts b/scripts/native-pack-tool/source/platforms/ios.ts index a2f69b5f2e..f5747746ca 100644 --- a/scripts/native-pack-tool/source/platforms/ios.ts +++ b/scripts/native-pack-tool/source/platforms/ios.ts @@ -85,7 +85,7 @@ export class IOSPackTool extends MacOSPackTool { async generate() { if(!await this.checkIfXcodeInstalled()) { - throw new Error(`Please check if Xcode is installed.`); + console.error(`Please check if Xcode is installed.`); } if(this.shouldSkipGenerate()) { diff --git a/scripts/native-pack-tool/source/platforms/mac-os.ts b/scripts/native-pack-tool/source/platforms/mac-os.ts index f7ad87dcb0..4a3757e930 100644 --- a/scripts/native-pack-tool/source/platforms/mac-os.ts +++ b/scripts/native-pack-tool/source/platforms/mac-os.ts @@ -173,7 +173,7 @@ export abstract class MacOSPackTool extends NativePackTool { const xcodeInstalled = await toolHelper.runCommand('xcode-select', ['-p'], (code, stdout, stderr) => { if (code === 0) { console.log(`[xcode-select] ${stdout}`); - if (stdout.indexOf('Xcode.app') > 0) { + if (stdout.indexOf('Xcode') > 0) { xcodeFound = true; } } else { diff --git a/scripts/native-pack-tool/source/platforms/mac.ts b/scripts/native-pack-tool/source/platforms/mac.ts index 9f875fa104..0fb29225ae 100644 --- a/scripts/native-pack-tool/source/platforms/mac.ts +++ b/scripts/native-pack-tool/source/platforms/mac.ts @@ -23,7 +23,7 @@ export class MacPackTool extends MacOSPackTool { async generate() { if(!await this.checkIfXcodeInstalled()) { - throw new Error(`Please check if Xcode is installed.`); + console.error(`Please check if Xcode is installed.`); } if(this.shouldSkipGenerate()) {