We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
withFileTypes
1 parent 915d680 commit 3cb31efCopy full SHA for 3cb31ef
.github/actions/cache-query-compilation/move-caches.js
@@ -13,16 +13,12 @@ const path = require("path");
13
const COMBINED_CACHE_DIR = process.argv[2];
14
15
function* walkCaches(dir) {
16
- const files = fs.readdirSync(dir);
+ const files = fs.readdirSync(dir, { withFileTypes: true });
17
for (const file of files) {
18
- const filePath = path.join(dir, file);
19
- if (!fs.existsSync(filePath)) {
20
- continue;
21
- }
22
- const stat = fs.statSync(filePath);
23
- if (stat.isDirectory()) {
+ if (file.isDirectory()) {
+ const filePath = path.join(dir, file.name);
24
yield* walkCaches(filePath);
25
- if (file === ".cache") {
+ if (file.name === ".cache") {
26
yield filePath;
27
}
28
0 commit comments