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 4
4
5
5
import importlib .resources
6
6
import os
7
- import shutil
8
7
import subprocess
9
8
import sys
10
9
from typing import TYPE_CHECKING
11
10
11
+ from jdk4py import JAVA
12
+
12
13
if TYPE_CHECKING :
13
14
from pathlib import Path
14
15
@@ -26,18 +27,7 @@ def run(args: list[str] | None = None) -> subprocess.CompletedProcess[bytes]:
26
27
subprocess.CompletedProcess[bytes]: The result of running the OpenAPI Generator CLI.
27
28
28
29
"""
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 ]
41
31
42
32
java_opts = os .getenv ("JAVA_OPTS" )
43
33
if java_opts :
You can’t perform that action at this time.
0 commit comments