Skip to content

Commit 99ad675

Browse files
Copilotdmichon-msft
andcommitted
fix: use non-greedy matching in FileError problem matcher patterns to handle paths with spaces
Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/rushstack/sessions/d3363f24-2939-4850-85fb-b8b3eafa7a1e
1 parent b166995 commit 99ad675

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

libraries/node-core-library/src/FileError.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const uuidFileError: string = '37a4c772-2dc8-4c66-89ae-262f8cc1f0c1';
5050
const baseFolderEnvVar: string = 'RUSHSTACK_FILE_ERROR_BASE_FOLDER';
5151

5252
const unixProblemMatcherPattern: IProblemPattern = {
53-
regexp: '^\\[[^\\]]+\\]\\s+(Error|Warning):\\s+([^:\\s]+)(?::(\\d+)(?::(\\d+))?)?\\s+-\\s+(?:\\(([^)]+)\\)\\s+)?(.*)$',
53+
regexp: '^\\[[^\\]]+\\]\\s+(Error|Warning):\\s+([^:]+?)(?::(\\d+)(?::(\\d+))?)?\\s+-\\s+(?:\\(([^)]+)\\)\\s+)?(.*)$',
5454
severity: 1,
5555
file: 2,
5656
line: 3,
@@ -61,7 +61,7 @@ const unixProblemMatcherPattern: IProblemPattern = {
6161

6262
const vsProblemMatcherPattern: IProblemPattern = {
6363
regexp:
64-
'^\\[[^\\]]+\\]\\s+(Error|Warning):\\s+([^\\(\\s]+)(?:\\((\\d+)(?:,(\\d+))?\\))?\\s+-\\s+(?:\\(([^)]+)\\)\\s+)?(.*)$',
64+
'^\\[[^\\]]+\\]\\s+(Error|Warning):\\s+([^\\(]+?)(?:\\((\\d+)(?:,(\\d+))?\\))?\\s+-\\s+(?:\\(([^)]+)\\)\\s+)?(.*)$',
6565
severity: 1,
6666
file: 2,
6767
line: 3,

0 commit comments

Comments
 (0)