From 61b8d8ba2c2f815491d4c4f5a917ccbb67839479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Thu, 21 Sep 2023 17:53:27 +0100 Subject: [PATCH] fix: remove `entry_point.c` file --- lib/internal/util.js | 2 +- test/js-native-api/test_cannot_run_js/entry_point.c | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 test/js-native-api/test_cannot_run_js/entry_point.c diff --git a/lib/internal/util.js b/lib/internal/util.js index e5628c22084900..558a5da69773bb 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -377,7 +377,7 @@ function getCWDURL() { // It's a relatively cheap call performance-wise for the most common use case. cwd = process.cwd(); } catch { - cachedURL ??= pathToFileURL("/"); + cachedURL ??= pathToFileURL(sep); } if (cwd != null && cwd !== cachedCWD) { diff --git a/test/js-native-api/test_cannot_run_js/entry_point.c b/test/js-native-api/test_cannot_run_js/entry_point.c deleted file mode 100644 index 6b7b50a38c9535..00000000000000 --- a/test/js-native-api/test_cannot_run_js/entry_point.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -EXTERN_C_START -napi_value Init(napi_env env, napi_value exports); -EXTERN_C_END - -NAPI_MODULE(NODE_GYP_MODULE_NAME, Init)