Skip to content

Commit 9eadcaf

Browse files
authored
Only output error message when file exists (#23155)
Close https://github.com/github/docs-engineering/issues/1276
1 parent 18a54dd commit 9eadcaf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

script/i18n/fix-translation-errors.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ async function main() {
3333
try {
3434
fileContents = await readFileAsync(path, 'utf8')
3535
} catch (e) {
36-
console.error(e.message)
36+
if (fs.existsSync(path)) {
37+
console.error(e.message)
38+
}
3739
return null
3840
}
3941

0 commit comments

Comments
 (0)