Skip to content

Commit 23d7dc6

Browse files
fix: file path diff broken (#291)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 5ebb415 commit 23d7dc6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/lint/checkDiff.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ export default function (
5151
.then(({ version, files: pkgFiles }: { version: string; files: FileItem[] }) => {
5252
function flattenPath(files: FileItem[], fileList: string[] = []): string[] {
5353
(files || []).forEach(({ path, files: subFiles }) => {
54-
const realPath = argv.path ? join(argv.path, path) : path
55-
fileList.push(realPath);
54+
const realPath = argv.path ? join(argv.path, path) : path;
55+
fileList.push(realPath.replace(/^\//, ''));
5656
flattenPath(subFiles, fileList);
5757
});
5858
return fileList;
@@ -89,8 +89,6 @@ export default function (
8989
return { missingFiles, addedFiles, version };
9090
})
9191
.then(({ missingFiles, addedFiles, version }) => {
92-
93-
9492
if (addedFiles.length) {
9593
console.log(
9694
chalk.yellow(`⚠️ Some file added in current build (last version: ${version}):`)

0 commit comments

Comments
 (0)