File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change 44
55import importlib .resources
66import os
7- import shutil
87import subprocess
98import sys
109from typing import TYPE_CHECKING
1110
11+ from jdk4py import JAVA
12+
1213if TYPE_CHECKING :
1314 from pathlib import Path
1415
@@ -26,18 +27,7 @@ def run(args: list[str] | None = None) -> subprocess.CompletedProcess[bytes]:
2627 subprocess.CompletedProcess[bytes]: The result of running the OpenAPI Generator CLI.
2728
2829 """
29- java_path : Path | str | None
30- try :
31- from jdk4py import JAVA
32-
33- java_path = JAVA
34- except ImportError :
35- java_path = shutil .which ("java" )
36- if not java_path :
37- msg = "java runtime is not found in PATH"
38- raise RuntimeError (msg )
39-
40- arguments = [java_path ]
30+ arguments : str | Path = [JAVA ]
4131
4232 java_opts = os .getenv ("JAVA_OPTS" )
4333 if java_opts :
You can’t perform that action at this time.
0 commit comments