Another CI fix attempt

This commit is contained in:
Holly Stubbs 2023-07-28 10:01:47 +01:00 committed by GitHub
parent 530b468dfb
commit 2d7815cff8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@
// for when you're just too lazy to // for when you're just too lazy to
// do it properly. // do it properly.
import { readdirSync, statSync, readFileSync, writeFileSync } from "fs"; import { readdirSync, lstatSync, readFileSync, writeFileSync } from "fs";
const tsFileData:Array<string> = new Array<string>(); const tsFileData:Array<string> = new Array<string>();
@ -19,7 +19,7 @@ function readDir(nam:string) {
// This is a very dumb way of checking for folders // This is a very dumb way of checking for folders
// protip: don't do this. // protip: don't do this.
if (statSync(`${nam}/${file}`).size == 0) { if (statSync(`${nam}/${file}`).isDirectory()) {
readDir(`${nam}/${file}`); readDir(`${nam}/${file}`);
} else if (file.endsWith(".ts")) { } else if (file.endsWith(".ts")) {
tsFileData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); tsFileData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString());