Skip to content

Commit 33ffd60

Browse files
fix: typing
1 parent af16831 commit 33ffd60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/install.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ import logger from '@wdio/logger'
1010
import { HttpsProxyAgent } from 'https-proxy-agent'
1111
import { HttpProxyAgent } from 'http-proxy-agent'
1212
import { unpackTar } from 'modern-tar/fs'
13+
import { BlobReader, BlobWriter, ZipReader, type FileEntry } from '@zip.js/zip.js'
1314

1415
import { BINARY_FILE, GECKODRIVER_CARGO_YAML } from './constants.js'
1516
import { hasAccess, getDownloadUrl, retryFetch } from './utils.js'
1617

17-
import { BlobReader, BlobWriter, ZipReader } from '@zip.js/zip.js'
18-
1918
const log = logger('geckodriver')
2019

2120
const fetchOpts: RequestInit & {
@@ -75,10 +74,11 @@ async function downloadZip(res: Awaited<ReturnType<typeof retryFetch>>, cacheDir
7574
if (entry.directory) {
7675
continue
7776
}
77+
const fileEntry = entry as FileEntry
7878
if (!await hasAccess(path.dirname(unzippedFilePath))) {
7979
await fsp.mkdir(path.dirname(unzippedFilePath), { recursive: true })
8080
}
81-
const content = await entry.getData<Blob>(new BlobWriter())
81+
const content = await fileEntry.getData<Blob>(new BlobWriter())
8282
await writeFile(unzippedFilePath, content.stream())
8383
}
8484
}

0 commit comments

Comments
 (0)