Skip to content

Commit 2ac6270

Browse files
authored
fix: enable GECKODRIVER_AUTO_INSTALL usage on Windows (#662)
1 parent c41f6fe commit 2ac6270

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/install.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,12 @@ async function downloadZip(res: Awaited<ReturnType<typeof retryFetch>>, cacheDir
8888
/**
8989
* download on install
9090
*/
91-
if (process.argv[1] && process.argv[1].endsWith('/dist/install.js') && process.env.GECKODRIVER_AUTO_INSTALL) {
91+
const installJsPath = path.join('dist', 'install.js')
92+
if (
93+
process.argv[1] &&
94+
path.normalize(process.argv[1]).endsWith(path.sep + installJsPath) &&
95+
process.env.GECKODRIVER_AUTO_INSTALL
96+
) {
9297
await download().then(
9398
() => log.info('Success!'),
9499
(err) => log.error(`Failed to install Geckodriver: ${err.stack}`)

0 commit comments

Comments
 (0)