Fix subprocess will create a terminal window when Minecraft is running.
Add a daemon to refresh account token.
This commit is contained in:
@@ -26,6 +26,11 @@ def get_java_version(java_executable_path: str | Path) -> tuple[int, str]:
|
||||
[java_executable_path, "-version"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
creationflags=(
|
||||
subprocess.CREATE_NO_WINDOW
|
||||
if sys.platform == "win32"
|
||||
else 0
|
||||
),
|
||||
text=True,
|
||||
encoding="utf-8",
|
||||
errors="replace",
|
||||
@@ -159,4 +164,4 @@ def find_java_installations(extra_install_patterns: list | None=None) -> tuple[l
|
||||
|
||||
installations.sort(key=lambda item: item["major"], reverse=True)
|
||||
|
||||
return installations, errors
|
||||
return installations, errors
|
||||
|
||||
Reference in New Issue
Block a user