File tree 1 file changed +12
-8
lines changed
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -118,23 +118,27 @@ async function main(): Promise<void> {
118
118
for ( const [ index , file ] of files . entries ( ) ) {
119
119
const { file : filePath , links } = file
120
120
process . stdout . write ( `${ index + 1 } ${ filePath } ` )
121
- failedLinks . push ( ...( await checkLinksInFile ( filePath , links ) ) )
121
+ failedLinks . push (
122
+ ...( await checkLinksInFile ( filePath , links ) ) . map (
123
+ ( l ) => `${ filePath } : ${ l } ` ,
124
+ ) ,
125
+ )
122
126
process . stdout . write ( '\n' )
123
127
}
124
128
125
129
console . log ( 'Checking links in Vercel.json' )
126
130
failedLinks . push (
127
- ...( await checkLinksInFile (
128
- 'vercel.json' ,
129
- vercelConfig . redirects . map ( ( l ) => l . destination ) ,
130
- ) ) ,
131
+ ...(
132
+ await checkLinksInFile (
133
+ 'vercel.json' ,
134
+ vercelConfig . redirects . map ( ( l ) => l . destination ) ,
135
+ )
136
+ ) . map ( ( l ) => `vercel.json: ${ l } ` ) ,
131
137
)
132
138
133
- const dedupedFailedLinks = [ ...new Set ( failedLinks ) ]
134
-
135
139
if ( failedLinks . length > 0 ) {
136
140
console . error ( '\nThe following links are broken:' )
137
- for ( const link of dedupedFailedLinks ) {
141
+ for ( const link of failedLinks ) {
138
142
console . error ( link )
139
143
}
140
144
process . exit ( 1 )
You can’t perform that action at this time.
0 commit comments