@@ -108,12 +108,21 @@ async function downloadVersion(
108108 await validateChecksum ( checkSum , downloadPath , arch , platform , version ) ;
109109
110110 let uvDir : string ;
111- const extension = getExtension ( platform ) ;
112111 if ( platform === "pc-windows-msvc" ) {
113- const fullPathWithExtension = `${ downloadPath } ${ extension } ` ;
114- await fs . copyFile ( downloadPath , fullPathWithExtension ) ;
115- uvDir = await tc . extractZip ( fullPathWithExtension ) ;
116112 // On windows extracting the zip does not create an intermediate directory
113+ try {
114+ // Try tar first as it's much faster, but only bsdtar supports zip files,
115+ // so this my fail if another tar, like gnu tar, ends up being used.
116+ uvDir = await tc . extractTar ( downloadPath , undefined , "x" ) ;
117+ } catch ( err ) {
118+ core . info (
119+ `Extracting with tar failed, falling back to zip extraction: ${ ( err as Error ) . message } ` ,
120+ ) ;
121+ const extension = getExtension ( platform ) ;
122+ const fullPathWithExtension = `${ downloadPath } ${ extension } ` ;
123+ await fs . copyFile ( downloadPath , fullPathWithExtension ) ;
124+ uvDir = await tc . extractZip ( fullPathWithExtension ) ;
125+ }
117126 } else {
118127 const extractedDir = await tc . extractTar ( downloadPath ) ;
119128 uvDir = path . join ( extractedDir , artifactName ) ;
0 commit comments