File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,12 @@ def get_latest_codeql(args):
4343 codeql = CodeQL (CODEQL_HOME )
4444 current_installed_version = codeql .get_current_local_version ()
4545 logger .info (f'Current codeql version: { current_installed_version } ' )
46- latest_online_version = codeql .get_latest_codeql_github_version ()
47- if current_installed_version != latest_online_version .title and args .check_latest_cli :
48- # we got a newer version online, download and install it
49- codeql .download_and_install_latest_codeql (latest_online_version )
46+ # ensure we only query for the latest codeql cli version if we might actually update it
47+ if args .check_latest_cli :
48+ latest_online_version = codeql .get_latest_codeql_github_version ()
49+ if current_installed_version != latest_online_version .title :
50+ # we got a newer version online, download and install it
51+ codeql .download_and_install_latest_codeql (latest_online_version )
5052 # get the latest queries regardless (TODO: Optimize by storing and checking the last commit hash?)
5153 if args .check_latest_queries :
5254 codeql .download_and_install_latest_codeql_queries ()
You can’t perform that action at this time.
0 commit comments