Skip to content

Commit

Permalink
fix(ci): ignore deleted file in log-url-isuses script (#35776)
Browse files Browse the repository at this point in the history
  • Loading branch information
OnkarRuikar committed Sep 6, 2024
1 parent dfe56b2 commit dd91930
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/log-url-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ function getFragmentDetails(fromStaging = true) {
.filter((header) => !addedFragments.includes(header))
.filter((header) => {
// check if another header with same name exists in the file
const headerAnchors = getFileAnchors(
`${rootDir}/files/en-us/${path}/index.md`,
);
const absPath = `${rootDir}/files/en-us/${path}/index.md`;
if (!fs.existsSync(absPath)) {
return true;
}
const headerAnchors = getFileAnchors(absPath);
return !headerAnchors.includes(header);
})
.forEach((header) => {
Expand Down

0 comments on commit dd91930

Please sign in to comment.