1
0
Fork 0

Recognize symlinks

Fixes: #1925
pull/1953/head
Sorin Sbarnea 2025-02-13 20:49:04 +00:00
parent 340a6b15b5
commit b2444c0f7c
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ export async function tryGetExecutablePath(
let stats: fs.Stats | undefined = undefined let stats: fs.Stats | undefined = undefined
try { try {
// test file exists // test file exists
stats = await stat(filePath) stats = await lstat(filePath)
} catch (err) { } catch (err) {
if (err.code !== 'ENOENT') { if (err.code !== 'ENOENT') {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
@ -106,7 +106,7 @@ export async function tryGetExecutablePath(
stats = undefined stats = undefined
try { try {
stats = await stat(filePath) stats = await lstat(filePath)
} catch (err) { } catch (err) {
if (err.code !== 'ENOENT') { if (err.code !== 'ENOENT') {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console