remove bash -lc
This commit is contained in:
@@ -841,21 +841,18 @@ def create_systemd_units(ipv6_enabled: bool):
|
|||||||
def gather_versions(npm_app_version: str):
|
def gather_versions(npm_app_version: str):
|
||||||
_ips = run_out(["hostname", "-I"], check=False) or ""
|
_ips = run_out(["hostname", "-I"], check=False) or ""
|
||||||
ip = (_ips.split() or [""])[0]
|
ip = (_ips.split() or [""])[0]
|
||||||
_angie = (run_out(["angie", "-v"], check=False) or "").strip()
|
|
||||||
angie_v = ""
|
|
||||||
for pat in (
|
|
||||||
r"(?i)\bangie\s*/\s*(\d+(?:\.\d+)+)\b",
|
|
||||||
r"(?i)\bangie\s+version:\s*angie/\s*(\d+(?:\.\d+)+)\b",
|
|
||||||
):
|
|
||||||
m = re.search(pat, _angie)
|
|
||||||
if m:
|
|
||||||
angie_v = m.group(1)
|
|
||||||
break
|
|
||||||
if not angie_v:
|
|
||||||
m = re.search(r"\b\d+(?:\.\d+)+\b", _angie)
|
|
||||||
angie_v = m.group(0) if m else _angie
|
|
||||||
|
|
||||||
|
angie_out = (
|
||||||
|
(run_out(["angie", "-v"], check=False) or "") + "\n" +
|
||||||
|
(run_out(["angie", "-V"], check=False) or "")
|
||||||
|
)
|
||||||
|
m = re.search(r"(?i)\bangie\s*/\s*([0-9]+(?:\.[0-9]+)+)\b", angie_out)
|
||||||
|
if not m:
|
||||||
|
dp = (run_out(["dpkg-query", "-W", "-f=${Version}", "angie"], check=False) or "").strip()
|
||||||
|
m = re.search(r"([0-9]+(?:\.[0-9]+)+)", dp)
|
||||||
|
angie_v = m.group(1) if m else (angie_out.strip() or "")
|
||||||
node_v = (run_out(["node", "-v"], check=False) or "").strip().lstrip("v")
|
node_v = (run_out(["node", "-v"], check=False) or "").strip().lstrip("v")
|
||||||
|
|
||||||
yarn_v = (run_out(["yarn", "-v"], check=False) or "").strip()
|
yarn_v = (run_out(["yarn", "-v"], check=False) or "").strip()
|
||||||
if not yarn_v:
|
if not yarn_v:
|
||||||
yarn_v = (run_out(["yarnpkg", "-v"], check=False) or "").strip()
|
yarn_v = (run_out(["yarnpkg", "-v"], check=False) or "").strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user