From b4fa17360cb7dec97d064217db1831c03fde0e37 Mon Sep 17 00:00:00 2001 From: bojiang Date: Tue, 23 Aug 2022 18:04:04 +0800 Subject: [PATCH] fixed abb2160 from https://gitee.com/BoJiang4702/developtools_ace-ets2bundle/pulls/989 jiangbo91@huawei.com Fix duplicate error in symbol printing log in file Signed-off-by: bojiang Change-Id: I2ec625038b6775a8f05ac7c56543a270fc53b928 --- compiler/src/compile_info.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/compile_info.ts b/compiler/src/compile_info.ts index 5533fc1..affb5f9 100644 --- a/compiler/src/compile_info.ts +++ b/compiler/src/compile_info.ts @@ -349,7 +349,7 @@ export class ResultStates { .replace(/\(Emitted value instead of an instance of Error\) BUILD/, '') .replace(/^ERROR/, 'ETS:ERROR'); this.printErrorMessage(errorMessage, true, errors[index]); - } else { + } else if (!/TS[0-9]+:/.test(errors[index].message.toString())) { let errorMessage: string = `${errors[index].message.replace(/\[tsl\]\s*/, '') .replace(/\u001b\[.*?m/g, '').replace(/\.ets\.ts/g, '.ets').trim()}\n`; errorMessage = this.filterModuleError(errorMessage)