From 22f504509eff0337ac4da6fd20c9ad3ef439f5ae Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Thu, 19 Oct 2023 22:47:57 -0700 Subject: [PATCH] tweak --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 2215e8ef..98d4ae5a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -76,9 +76,9 @@ export async function createWebdriverIO(opts: ProgramOpts) { */ const pm = PMs.find((pm) => ( // for pnpm check for "~/Library/pnpm/store/v3/..." - process.argv[0].includes(`${path.sep}${pm}${path.sep}`) || + process.argv[1].includes(`${path.sep}${pm}${path.sep}`) || // for NPM and Yarn check for "~/.npm/npx/..." or "~/.yarn/bin/create-wdio" - process.argv[0].includes(`${path.sep}.${pm}${path.sep}`) + process.argv[1].includes(`${path.sep}.${pm}${path.sep}`) )) || 'npm' /**