mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 09:00:22 +00:00
fix(daemon): handle systemctl is-enabled exit 4 (not-found) on Ubuntu (#33634)
Merged via squash.
Prepared head SHA: 67dffc3ee2
Co-authored-by: Yuandiaodiaodiao <33371662+Yuandiaodiaodiao@users.noreply.github.com>
Co-authored-by: shakkernerd <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
This commit is contained in:
@@ -143,7 +143,10 @@ async function execSystemctl(
|
||||
}
|
||||
|
||||
function readSystemctlDetail(result: { stdout: string; stderr: string }): string {
|
||||
return (result.stderr || result.stdout || "").trim();
|
||||
// Concatenate both streams so pattern matchers (isSystemdUnitNotEnabled,
|
||||
// isSystemctlMissing) can see the unit status from stdout even when
|
||||
// execFileUtf8 populates stderr with the Node error message fallback.
|
||||
return `${result.stderr} ${result.stdout}`.trim();
|
||||
}
|
||||
|
||||
function isSystemctlMissing(detail: string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user