mirror of
https://github.com/iptv-org/epg
synced 2026-09-08 13:00:04 -04:00
update worker validation
This commit is contained in:
@@ -63,25 +63,4 @@ jobs:
|
||||
npm run channels:validate -- ${{ steps.files.outputs.channels_all_changed_files }}
|
||||
- name: Check changed workers.txt file
|
||||
if: steps.files.outputs.workers_any_changed == 'true'
|
||||
run: |
|
||||
node -e "
|
||||
const fs = require('fs');
|
||||
const lines = fs.readFileSync('workers.txt', 'utf8').split('\n');
|
||||
let errors = 0;
|
||||
|
||||
lines.forEach((line, index) => {
|
||||
if (index === lines.length - 1 && !line.trim()) return;
|
||||
const lineNum = index + 1;
|
||||
|
||||
if (!line.endsWith('\r')) {
|
||||
console.error(' workers.txt\n ' + lineNum + ':1 line must use CRLF (Windows) line endings');
|
||||
errors++;
|
||||
}
|
||||
if (line.includes(' ')) {
|
||||
console.error(' workers.txt\n ' + lineNum + ':1 line cannot contain spaces');
|
||||
errors++;
|
||||
}
|
||||
});
|
||||
|
||||
if (errors > 0) process.exit(1);
|
||||
"
|
||||
run: npm run workers:validate
|
||||
|
||||
Reference in New Issue
Block a user