File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import * as tar from 'tar';
55import axios from 'axios' ;
66import * as unzipper from 'unzipper' ;
77import { Semaphore } from 'async-mutex' ;
8+ import * as os from "os" ;
89
910export class CxInstaller {
1011 private readonly platform : string ;
@@ -63,7 +64,7 @@ export class CxInstaller {
6364 }
6465
6566 const url = await this . getDownloadURL ( ) ;
66- const zipPath = this . getZipPath ( ) ;
67+ const zipPath = path . join ( os . tmpdir ( ) , `ast-cli. ${ this . platform === 'win32' ? 'zip' : 'tar.gz' } ` ) ;
6768
6869 await this . downloadFile ( url , zipPath ) ;
6970 console . log ( 'Downloaded CLI to:' , zipPath ) ;
@@ -106,12 +107,6 @@ export class CxInstaller {
106107 } ) ;
107108 }
108109
109- getZipPath ( ) : string {
110- return this . platform === 'win32'
111- ? path . join ( this . resourceDirPath , 'cx.zip' )
112- : path . join ( this . resourceDirPath , 'cx.tar.gz' ) ;
113- }
114-
115110 checkExecutableExists ( ) : boolean {
116111 return fs1 . existsSync ( this . getExecutablePath ( ) ) ;
117112 }
You can’t perform that action at this time.
0 commit comments