Add SSM deployment and reliable Maven setup
This commit is contained in:
@@ -35,6 +35,10 @@ def main() -> int:
|
||||
pid_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
encoding = locale.getpreferredencoding(False) or "utf-8"
|
||||
environment = os.environ.copy()
|
||||
executable = Path(command[0])
|
||||
if executable.name.lower() in {"catalina.bat", "catalina.sh"} and executable.exists():
|
||||
environment["CATALINA_HOME"] = str(executable.parent.parent)
|
||||
with log_path.open("a", encoding="utf-8") as log_file:
|
||||
process = subprocess.Popen(
|
||||
command,
|
||||
@@ -46,6 +50,7 @@ def main() -> int:
|
||||
errors="replace",
|
||||
bufsize=1,
|
||||
shell=False,
|
||||
env=environment,
|
||||
)
|
||||
pid_path.write_text(str(process.pid), encoding="ascii")
|
||||
assert process.stdout is not None
|
||||
|
||||
Reference in New Issue
Block a user