33const https = require ( "https" ) ;
44const fs = require ( "fs" ) ;
55const path = require ( "path" ) ;
6- const { execSync } = require ( "child_process" ) ;
76const zlib = require ( "zlib" ) ;
87
98// GitHub repo info
@@ -76,8 +75,7 @@ async function downloadBinary() {
7675 // Extract tar.gz
7776 const tar = zlib . gunzipSync ( tarGz ) ;
7877
79- // Simple tar extraction (binary is first file, starts at byte 512)
80- // TAR header is 512 bytes, then file content
78+ // Simple tar extraction
8179 const binaryContent = extractTarFile ( tar , BINARY_NAME ) ;
8280
8381 // Write binary
@@ -90,13 +88,12 @@ async function downloadBinary() {
9088
9189 console . log ( `✓ Installed ${ BINARY_NAME } to ${ binaryPath } ` ) ;
9290 } catch ( error ) {
91+ console . error ( `\nError: Failed to download binary for ${ getPlatformKey ( ) } ` ) ;
92+ console . error ( ` ${ error . message } ` ) ;
9393 if ( error . message . includes ( "404" ) ) {
94- console . error ( `\nError: No prebuilt binary found for ${ getPlatformKey ( ) } ` ) ;
95- console . error ( `Release v${ version } may not exist or may not have binaries yet.` ) ;
96- console . error ( `\nYou can build from source with: cargo build --release` ) ;
97- } else {
98- console . error ( `\nError downloading binary: ${ error . message } ` ) ;
94+ console . error ( `\nRelease v${ version } may not exist yet.` ) ;
9995 }
96+ console . error ( `\nYou can build from source with: cargo build --release` ) ;
10097 process . exit ( 1 ) ;
10198 }
10299}
@@ -129,4 +126,3 @@ function extractTarFile(tarBuffer, filename) {
129126}
130127
131128downloadBinary ( ) ;
132-
0 commit comments