Skip to content

Commit 5a3b5fa

Browse files
author
Rhys Koedijk
committed
Normalise file paths
1 parent 0e23b22 commit 5a3b5fa

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

task/utils/codespellRunner.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import path from 'path';
2+
13
import { debug, error, tool, warning, which } from 'azure-pipelines-task-lib/task';
24
import { ToolRunner } from 'azure-pipelines-task-lib/toolrunner';
35
import { IFile, IFileSuggestion } from './types';
@@ -72,7 +74,7 @@ export class CodespellRunner {
7274
const fixedFileMatch = line.match(/FIXED\: (.*)/i);
7375
if (fixedFileMatch) {
7476
fixedFiles.push({
75-
path: fixedFileMatch[1].trim(),
77+
path: path.normalize(fixedFileMatch[1]).trim(),
7678
});
7779
}
7880
const warningMatch = line.match(/WARNING\: (.*)/i);
@@ -162,6 +164,7 @@ export class CodespellRunner {
162164
.split('\n')
163165
.map((p) => p.trim())
164166
.filter((p) => p.length > 0)
167+
.map((p) => path.normalize(p))
165168
: [];
166169
}
167170
}

0 commit comments

Comments
 (0)