mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 11:58:37 +09:00
🐛 Handle case when java is not installed on system [skip ci]
This commit is contained in:
@@ -15,6 +15,7 @@ class Patches(object):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def check_java() -> None:
|
def check_java() -> None:
|
||||||
"""Check if Java17 is installed."""
|
"""Check if Java17 is installed."""
|
||||||
|
try:
|
||||||
logger.debug("Checking if java is available")
|
logger.debug("Checking if java is available")
|
||||||
jd = subprocess.check_output(
|
jd = subprocess.check_output(
|
||||||
["java", "-version"], stderr=subprocess.STDOUT
|
["java", "-version"], stderr=subprocess.STDOUT
|
||||||
@@ -27,6 +28,9 @@ class Patches(object):
|
|||||||
logger.debug("Java 17 Must be installed")
|
logger.debug("Java 17 Must be installed")
|
||||||
exit(-1)
|
exit(-1)
|
||||||
logger.debug("Cool!! Java is available")
|
logger.debug("Cool!! Java is available")
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
logger.debug("Java 17 Must be installed")
|
||||||
|
exit(-1)
|
||||||
|
|
||||||
# noinspection DuplicatedCode
|
# noinspection DuplicatedCode
|
||||||
def fetch_patches(self) -> None:
|
def fetch_patches(self) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user