Handle missing Java service executable
This commit is contained in:
@@ -90,6 +90,15 @@ def main() -> int:
|
||||
return 1
|
||||
process.terminate()
|
||||
return process.wait()
|
||||
except OSError as exc:
|
||||
message = f"无法启动服务命令 {command[0]}: {exc}\n"
|
||||
_write_console(console_output, message)
|
||||
try:
|
||||
with log_path.open("a", encoding="utf-8") as log_file:
|
||||
log_file.write(message)
|
||||
except OSError:
|
||||
pass
|
||||
return 1
|
||||
finally:
|
||||
if process is not None and process.stdout is not None:
|
||||
process.stdout.close()
|
||||
|
||||
Reference in New Issue
Block a user