Skip to content

Commit 6532db2

Browse files
committed
refactor: add logging for directory read failures in walkDir function
1 parent e8a653f commit 6532db2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/percy-snapshot-utils/detect-test-files.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
} from "../percy-snapshot-utils/constants.js";
1515

1616
import { DetectionConfig } from "../percy-snapshot-utils/types.js";
17+
import logger from "../../logger.js";
1718

1819
async function walkDir(
1920
dir: string,
@@ -37,7 +38,7 @@ async function walkDir(
3738
}
3839
}
3940
} catch {
40-
// ignore
41+
logger.info("Failed to read user directory");
4142
}
4243

4344
return result;

0 commit comments

Comments
 (0)