We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a5a793 commit 121e73cCopy full SHA for 121e73c
1 file changed
openapi_generator_cli/__init__.py
@@ -7,6 +7,7 @@
7
import shutil
8
import subprocess
9
import sys
10
+from jdk4py import JAVA
11
from typing import TYPE_CHECKING
12
13
if TYPE_CHECKING:
@@ -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.
28
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]
+ arguments = [JAVA]
41
42
java_opts = os.getenv("JAVA_OPTS")
43
if java_opts:
0 commit comments