Skip to content

Commit c6ef936

Browse files
Add logging to readFile for debugging file path and existence checks
1 parent 246ac39 commit c6ef936

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

dist/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34550,6 +34550,7 @@ const filePath = (config, filename) => `${config.directory}/${filename}`;
3455034550
const fileExists = (config, filename) => fs.existsSync(filePath(config, filename));
3455134551
exports.fileExists = fileExists;
3455234552
const readFile = (config, filename) => {
34553+
console.log(filePath(config, filename), fs.existsSync(filePath(config, filename)));
3455334554
if (!fs.existsSync(filePath(config, filename))) {
3455434555
return '';
3455534556
}

src/utils/filesystem.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const filePath = (config: Config, filename: string): string => `${ config.direct
2020
export const fileExists = (config: Config, filename: string): boolean => fs.existsSync(filePath(config, filename))
2121

2222
export const readFile = (config: Config, filename: string): string => {
23+
console.log(filePath(config, filename),fs.existsSync(filePath(config, filename)))
24+
2325
if (! fs.existsSync(filePath(config, filename))) {
2426
return ''
2527
}

0 commit comments

Comments
 (0)