@@ -40,7 +40,7 @@ def download_and_install_latest_codeql(self, github_version):
4040 download_url = f'https://github.com/github/codeql-cli-binaries/releases/download/{ github_version .title } /codeql-win64.zip'
4141 download_path = f'{ self .TEMP_DIR } /codeql_windows.zip'
4242 else :
43- exit (ERROR_UNKNOWN_OS )
43+ exit (self . ERROR_UNKNOWN_OS )
4444
4545 logger .info (f'Downloading codeql-cli version { github_version .title } ...' )
4646 check_output_wrapper (f"wget -q { download_url } -O { download_path } " , shell = True ).decode ("utf-8" )
@@ -61,17 +61,17 @@ def download_and_install_latest_codeql_queries(self):
6161 ret2 = check_output_wrapper (f'git clone { self .CODEQL_GO_QUERIES_URL } { codeql_go_repo_dir } ' , shell = True )
6262 if ret1 is CalledProcessError or ret2 is CalledProcessError :
6363 logger .error ("Could not run git command" )
64- exit (ERROR_GIT_COMMAND )
64+ exit (self . ERROR_GIT_COMMAND )
6565
6666 def get_current_local_version (self ):
6767 ret_string = check_output_wrapper (f'{ self .CODEQL_HOME } /codeql/codeql version' , shell = True ).decode ("utf-8" )
6868 if ret_string is CalledProcessError :
6969 logger .error ("Could not run codeql command" )
70- exit (ERROR_EXECUTING_CODEQL )
71- version_match = search ("Version: ([0-9.]+)\." , ret_string )
70+ exit (self . ERROR_EXECUTING_CODEQL )
71+ version_match = search ("toolchain release ([0-9.]+)\." , ret_string )
7272 if not version_match :
7373 logger .error ("Could not determine existing codeql version" )
74- exit (ERROR_EXECUTING_CODEQL )
74+ exit (self . ERROR_EXECUTING_CODEQL )
7575 version = f'v{ version_match .group (1 )} '
7676 return version
7777
@@ -80,7 +80,7 @@ def get_latest_codeql_github_version(self):
8080
8181 def install_codeql_cli (self , download_path ):
8282 logger .info ("Installing codeql-cli..." )
83- codeql_dir = f'{ self .CODEQL_HOME } /codeql-cli '
83+ codeql_dir = f'{ self .CODEQL_HOME } /codeql'
8484 wipe_and_create_dir (codeql_dir )
8585 ret1 = check_output_wrapper (f'unzip { download_path } -d { codeql_dir } ' , shell = True )
8686
@@ -91,5 +91,5 @@ def execute_codeql_command(self, args):
9191 ret_string = check_output_wrapper (f'{ self .CODEQL_HOME } /codeql/codeql { args } ' , shell = True )
9292 if ret_string is CalledProcessError :
9393 logger .error ("Could not run codeql command" )
94- exit (ERROR_EXECUTING_CODEQL )
94+ exit (self . ERROR_EXECUTING_CODEQL )
9595 return bytearray (ret_string ).decode ('utf-8' )
0 commit comments