Skip to content

Commit ac0256f

Browse files
committed
Tighten with scope
1 parent 9d03f33 commit ac0256f

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

scripts/upgrade-codeql-dependencies/upgrade-codeql-dependencies.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,17 @@ def main(cli_version : str, github_token: str) -> None:
4141

4242
with SUPPORTED_VERSIONS_PATH.open("r") as f:
4343
supported_versions = json.load(f)
44-
with SUPPORTED_VERSIONS_PATH.open("w") as f:
45-
supported_envs: List[Dict[str, str]] = supported_versions["supported_environment"]
46-
if len(supported_envs) != 1:
47-
print("Expected exactly one supported environment, cannot upgrade!")
48-
exit(1)
49-
supported_env = supported_envs[0]
50-
supported_env["codeql_cli"] = str(parsed_cli_version)
51-
supported_env["codeql_cli_bundle"] = compatible_bundle
52-
supported_env["codeql_standard_library"] = compatible_stdlib
5344

45+
supported_envs: List[Dict[str, str]] = supported_versions["supported_environment"]
46+
if len(supported_envs) != 1:
47+
print("Expected exactly one supported environment, cannot upgrade!")
48+
exit(1)
49+
supported_env = supported_envs[0]
50+
supported_env["codeql_cli"] = str(parsed_cli_version)
51+
supported_env["codeql_cli_bundle"] = compatible_bundle
52+
supported_env["codeql_standard_library"] = compatible_stdlib
53+
54+
with SUPPORTED_VERSIONS_PATH.open("w") as f:
5455
json.dump(supported_versions, f, indent=2)
5556
except ValueError as e:
5657
print(e)

0 commit comments

Comments
 (0)