From 675d0bb5afc1cdb430530c29b76cd0d2b32287b8 Mon Sep 17 00:00:00 2001 From: Oj Date: Thu, 15 Dec 2022 13:22:30 +0000 Subject: [PATCH] paths: fix searching in PATH sometimes being misleading --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 549cd03..f1a4804 100644 --- a/src/index.js +++ b/src/index.js @@ -46,7 +46,7 @@ const exists = async path => { if (path.includes(sep)) return await access(path).then(() => true).catch(() => false); // just binary name, so check path - return (await getBinariesInPath()).some(x => x.includes(path)); + return (await getBinariesInPath()).includes(path); }; const findBrowserPath = async (forceBrowser) => {