Tracking issue — not urgent.
postinstall.js runs on every npm install. On a systemd Linux host it attempts sudo cp wol-proxy.service /etc/systemd/system/ + sudo systemctl daemon-reload. Problems:
- Platform-specific: only handles systemd Linux. No macOS (launchd), Windows (services), or non-systemd Linux (OpenRC/runit/s6) — those users get nothing, and the "service" story is Linux-only.
- Runs
sudo from an install hook: privileged operations during npm install are surprising and fragile — they can prompt for a password, silently fail, or (on CI runners, where sudo is passwordless and /etc/systemd/system exists) actually mutate the host. It currently fires during CI npm ci.
- Auto-installing a system service as an install side effect is unexpected behavior for a library/CLI.
Direction for a later pass (make it platform-agnostic):
- Move service installation out of
postinstall into an explicit, opt-in command (e.g. a wol-proxy install-service bin subcommand, or documented manual steps).
- Detect the platform and either support the common init systems (systemd / launchd / Windows service) or clearly document manual setup per platform.
- Never
sudo from postinstall; skip entirely under CI (process.env.CI).
Surfaced during the @v4 onboarding (the onboarding installs devDeps with --ignore-scripts locally to avoid this).
Tracking issue — not urgent.
postinstall.jsruns on everynpm install. On a systemd Linux host it attemptssudo cp wol-proxy.service /etc/systemd/system/+sudo systemctl daemon-reload. Problems:sudofrom an install hook: privileged operations duringnpm installare surprising and fragile — they can prompt for a password, silently fail, or (on CI runners, where sudo is passwordless and/etc/systemd/systemexists) actually mutate the host. It currently fires during CInpm ci.Direction for a later pass (make it platform-agnostic):
postinstallinto an explicit, opt-in command (e.g. awol-proxy install-servicebin subcommand, or documented manual steps).sudofrompostinstall; skip entirely under CI (process.env.CI).Surfaced during the @v4 onboarding (the onboarding installs devDeps with
--ignore-scriptslocally to avoid this).