From b2444c0f7cdbd6af4f6f028f68d29aada67106cc Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Thu, 13 Feb 2025 20:49:04 +0000 Subject: [PATCH] Recognize symlinks Fixes: #1925 --- packages/io/src/io-util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/io/src/io-util.ts b/packages/io/src/io-util.ts index fd3a3e17..447c5900 100644 --- a/packages/io/src/io-util.ts +++ b/packages/io/src/io-util.ts @@ -76,7 +76,7 @@ export async function tryGetExecutablePath( let stats: fs.Stats | undefined = undefined try { // test file exists - stats = await stat(filePath) + stats = await lstat(filePath) } catch (err) { if (err.code !== 'ENOENT') { // eslint-disable-next-line no-console @@ -106,7 +106,7 @@ export async function tryGetExecutablePath( stats = undefined try { - stats = await stat(filePath) + stats = await lstat(filePath) } catch (err) { if (err.code !== 'ENOENT') { // eslint-disable-next-line no-console