@@ -193,51 +193,6 @@ function getCurrentVersion() {
193193 }
194194}
195195
196- function runSmokeTest ( binaryPath ) {
197- return new Promise ( ( resolve ) => {
198- if ( ! fs . existsSync ( binaryPath ) ) {
199- resolve ( false )
200- return
201- }
202-
203- const child = spawn ( binaryPath , [ '--version' ] , {
204- cwd : os . homedir ( ) ,
205- stdio : 'pipe' ,
206- } )
207-
208- let output = ''
209-
210- child . stdout . on ( 'data' , ( data ) => {
211- output += data . toString ( )
212- } )
213-
214- const timeout = setTimeout ( ( ) => {
215- child . kill ( 'SIGTERM' )
216- setTimeout ( ( ) => {
217- if ( ! child . killed ) {
218- child . kill ( 'SIGKILL' )
219- }
220- } , 1000 )
221- resolve ( false )
222- } , 5000 )
223-
224- child . on ( 'exit' , ( code ) => {
225- clearTimeout ( timeout )
226- // Check that it exits successfully and outputs something that looks like a version
227- if ( code === 0 && output . trim ( ) . match ( / ^ \d + ( \. \d + ) * ( - b e t a \. \d + ) ? $ / ) ) {
228- resolve ( true )
229- } else {
230- resolve ( false )
231- }
232- } )
233-
234- child . on ( 'error' , ( ) => {
235- clearTimeout ( timeout )
236- resolve ( false )
237- } )
238- } )
239- }
240-
241196function compareVersions ( v1 , v2 ) {
242197 if ( ! v1 || ! v2 ) return 0
243198
@@ -399,18 +354,7 @@ async function downloadBinary(version) {
399354 fs . chmodSync ( tempBinaryPath , 0o755 )
400355 }
401356
402- // Run smoke test on the downloaded binary
403- term . write ( 'Verifying download...' )
404- const smokeTestPassed = await runSmokeTest ( tempBinaryPath )
405-
406- if ( ! smokeTestPassed ) {
407- fs . rmSync ( CONFIG . tempDownloadDir , { recursive : true } )
408- const error = new Error ( 'Downloaded binary failed smoke test (--version check)' )
409- trackUpdateFailed ( error . message , version , { stage : 'smoke_test' } )
410- throw error
411- }
412-
413- // Smoke test passed - move binary to final location
357+ // Move binary to final location
414358 try {
415359 if ( fs . existsSync ( CONFIG . binaryPath ) ) {
416360 try {
0 commit comments