File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,11 @@ import logger from '@wdio/logger'
1010import { HttpsProxyAgent } from 'https-proxy-agent'
1111import { HttpProxyAgent } from 'http-proxy-agent'
1212import { unpackTar } from 'modern-tar/fs'
13+ import { BlobReader , BlobWriter , ZipReader , type FileEntry } from '@zip.js/zip.js'
1314
1415import { BINARY_FILE , GECKODRIVER_CARGO_YAML } from './constants.js'
1516import { hasAccess , getDownloadUrl , retryFetch } from './utils.js'
1617
17- import { BlobReader , BlobWriter , ZipReader } from '@zip.js/zip.js'
18-
1918const log = logger ( 'geckodriver' )
2019
2120const 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}
You can’t perform that action at this time.
0 commit comments