Skip to content

Commit c84d987

Browse files
authored
Prevent creation of empty source files (#23634)
* Add test to prevent `crowdin upload` errors * Remove empty file causing `crowdin upload` error Closes https://github.com/github/crowdin-support/issues/117
1 parent aea2736 commit c84d987

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

data/reusables/actions/ae-beta.md

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import {execSync} from 'child_process'
2+
3+
describe('source directories', () => {
4+
// crowdin upload sources command fails if there are empty source files
5+
// please refer to crowdin-support #117 for more details
6+
it('should not contain empty files', () => {
7+
const command = "find content data -type f -empty"
8+
const emptyFiles = execSync(command).toString().split("\n")
9+
const disallowedEmptyFiles = emptyFiles.filter(file => file.match(/\.(yml|md)$/))
10+
11+
expect(disallowedEmptyFiles).toEqual([])
12+
})
13+
})

0 commit comments

Comments
 (0)