From 78c4cb11eb98f7e2af4a2849e52bc5f1d41b43bb Mon Sep 17 00:00:00 2001 From: "Harry.Tao" Date: Tue, 18 Feb 2025 22:33:49 +0800 Subject: [PATCH] fix unsupport symbolic link folders --- packages/bruno-cli/src/commands/run.js | 2 +- packages/bruno-cli/src/utils/filesystem.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bruno-cli/src/commands/run.js b/packages/bruno-cli/src/commands/run.js index 13106de96..83911f876 100644 --- a/packages/bruno-cli/src/commands/run.js +++ b/packages/bruno-cli/src/commands/run.js @@ -177,7 +177,7 @@ const getBruFilesRecursively = (dir, testsOnly) => { for (const file of filesInCurrentDir) { const filePath = path.join(currentPath, file); - const stats = fs.lstatSync(filePath); + const stats = fs.statSync(filePath); // todo: we might need a ignore config inside bruno.json if ( diff --git a/packages/bruno-cli/src/utils/filesystem.js b/packages/bruno-cli/src/utils/filesystem.js index 4b066ac68..c3438cebc 100644 --- a/packages/bruno-cli/src/utils/filesystem.js +++ b/packages/bruno-cli/src/utils/filesystem.js @@ -29,7 +29,7 @@ const isFile = (filepath) => { const isDirectory = (dirPath) => { try { - return fs.existsSync(dirPath) && fs.lstatSync(dirPath).isDirectory(); + return fs.existsSync(dirPath) && fs.statSync(dirPath).isDirectory(); } catch (_) { return false; }