Skip to content

Commit 2dabae2

Browse files
committed
removed exists checks
1 parent 64b7229 commit 2dabae2

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

packages/node-addon-examples/scripts/cmake-projects.mts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { readdirSync, statSync, existsSync } from "node:fs";
1+
import { readdirSync, statSync } from "node:fs";
22
import path from "node:path";
33

44
export const EXAMPLES_DIR = path.resolve(import.meta.dirname, "../examples");
@@ -7,9 +7,6 @@ export const DIRS = [EXAMPLES_DIR, TESTS_DIR];
77

88
export function findCMakeProjectsRecursively(dir: string): string[] {
99
let results: string[] = [];
10-
if (!existsSync(dir)) {
11-
return results;
12-
}
1310
const files = readdirSync(dir);
1411

1512
for (const file of files) {

packages/node-addon-examples/scripts/verify-prebuilds.mts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ async function verifyAndroidPrebuild(dirent: fs.Dirent) {
2525
);
2626
for (const arch of EXPECTED_ANDROID_ARCHS) {
2727
const archDir = path.join(dirent.parentPath, dirent.name, arch);
28-
if (!fs.existsSync(archDir)) {
29-
return;
30-
}
3128
for (const file of await fs.promises.readdir(archDir, {
3229
withFileTypes: true,
3330
})) {
@@ -44,9 +41,6 @@ async function verifyApplePrebuild(dirent: fs.Dirent) {
4441
console.log("Verifying Apple prebuild", dirent.name, "in", dirent.parentPath);
4542
for (const arch of EXPECTED_XCFRAMEWORK_PLATFORMS) {
4643
const archDir = path.join(dirent.parentPath, dirent.name, arch);
47-
if (!fs.existsSync(archDir)) {
48-
return;
49-
}
5044
for (const file of await fs.promises.readdir(archDir, {
5145
withFileTypes: true,
5246
})) {

0 commit comments

Comments
 (0)