Skip to content

fix: never warn from best-effort systemd probes#7

Merged
ofekby merged 1 commit into
mainfrom
fix/systemd-probe-debug
Jun 1, 2026
Merged

fix: never warn from best-effort systemd probes#7
ofekby merged 1 commit into
mainfrom
fix/systemd-probe-debug

Conversation

@ofekby
Copy link
Copy Markdown
Member

@ofekby ofekby commented Jun 1, 2026

Follow-up to #6, which didn't actually silence the noise.

Why #6 missed it

systemctlStatus() / lingerEnabled() call execFileSync with stderr ignored (stdio: ["ignore","pipe","ignore"]). So the isSystemdUnavailable(err) check added in #6 inspected an empty err.stderr and a generic "Command failed: systemctl …" message — its regex never matched — and execution fell through to logger.warn({ err }, …), still dumping a full error/stack trace to stderr on machines without a systemd user session. dial doctor and dial wait-for kept leaking it.

Fix

A best-effort status/linger probe failing — systemctl not on PATH, no user session bus (sandbox/container/CI), unit unknown — simply means "not running" for our purposes. Log any such failure at debug (suppressed by default; DIAL_LOG_LEVEL=debug to inspect), never warn. Removed the ineffective isSystemdUnavailable detector. Install/uninstall actions still surface real errors (they throw, unchanged).

Version 0.13.10.13.2.

Verification

npm run build clean; npm test — 51 pass / 0 fail.

🤖 Generated with Claude Code

The systemctl/loginctl status probes used execFileSync with stderr ignored, so
the earlier isSystemdUnavailable() check inspected an empty stderr / a generic
"Command failed" message, never matched, and fell through to logger.warn — still
dumping a stack trace to stderr on machines without a systemd user session
(`dial doctor`, `dial wait-for`).

A best-effort status/linger probe failing — systemctl missing, no user session
bus (sandbox/container/CI), unit unknown — just means "not running". Log any
such failure at debug (suppressed by default; DIAL_LOG_LEVEL=debug to see it),
never warn. Removed the ineffective detector.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ofekby ofekby merged commit e2d0e61 into main Jun 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant