ework-aio 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/install.sh +12 -5
  2. package/package.json +1 -1
package/bin/install.sh CHANGED
@@ -447,19 +447,25 @@ EOF
447
447
  fi
448
448
  }
449
449
 
450
- # ctl wraps `systemctl $SCOPENAME` with two hardenings over the bare command:
450
+ # ctl wraps `systemctl $SCOPENAME` with three hardenings over the bare command:
451
451
  # 1. If output contains "Unit ... not found", retry once after daemon-reload
452
452
  # — fresh user sessions (no linger, post-ssh-reconnect) often have a stale
453
453
  # unit cache and this is the standard fix.
454
- # 2. If output mentions bus connection failure, print an actionable hint
455
- # instead of letting the raw "No medium found" / "Failed to connect to
456
- # bus" message through unchanged.
454
+ # 2. If output mentions any D-Bus / user-bus connection failure, print an
455
+ # actionable hint. The user-bus daemon emits several variants across
456
+ # hosts and bash versions ("Failed to connect to bus", "No medium found",
457
+ # "Failed to get D-Bus connection: Operation not permitted",
458
+ # "Call to org.freedesktop.DBus ... failed"); we match the common stem
459
+ # "bus" / "D-Bus" so a new variant can't slip past.
460
+ # 3. ALWAYS return systemctl's real exit code. Previously the trailing
461
+ # `printf` masked the failure (returning 0) when no pattern matched,
462
+ # which made every caller's `|| fallback` silently not fire.
457
463
  ctl() {
458
464
  local out rc
459
465
  out="$(systemctl "$SCOPENAME" "$@" 2>&1)"
460
466
  rc=$?
461
467
  if [[ $rc -ne 0 ]]; then
462
- if [[ "$out" == *"Failed to connect to bus"* || "$out" == *"No medium found"* ]]; then
468
+ if [[ "$out" == *([Bb]us|D-Bus|No medium found)* ]]; then
463
469
  cat >&2 <<EOF
464
470
  ${c_red}systemctl $SCOPENAME failed to reach the user bus.${c_reset}
465
471
  $out
@@ -485,6 +491,7 @@ EOF
485
491
  fi
486
492
  fi
487
493
  printf '%s\n' "$out"
494
+ return "$rc"
488
495
  }
489
496
 
490
497
  # ─── Config mode: read/change runtime .env keys ─────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ework-aio",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "All-in-one installer for ework (issue tracker) + ework-daemon (AI bridge) + opencode-ework (plugin). One command: npm i -g ework-aio && ework-aio install.",
5
5
  "type": "module",
6
6
  "license": "MIT",