Skip to content

Commit 0e45d1f

Browse files
authored
Merge pull request compiler-explorer#1568 from mattgodbolt/partouf-patch-1
should this work?
2 parents 5f2286a + 7fa7f1d commit 0e45d1f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/handlers/health-check.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class HealthCheckHandler {
4242

4343
try {
4444
const content = await fs.readFile(this.filePath);
45+
if (content.length === 0) throw "File is empty";
4546
res.end(content);
4647
} catch (e) {
4748
logger.error(`*** HEALTH CHECK FAILURE: while reading file '${this.filePath}' got ${e}`);

0 commit comments

Comments
 (0)