Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(cli): make rsync optional, require only for ssh-manager sync (#22 follow-up)#26

Merged
bvisible merged 1 commit into
mainfrom
fix/rsync-optional
May 2, 2026
Merged

fix(cli): make rsync optional, require only for ssh-manager sync (#22 follow-up)#26
bvisible merged 1 commit into
mainfrom
fix/rsync-optional

Conversation

@bvisible

Copy link
Copy Markdown
Owner

Summary

Follow-up to #22, surfaced while @Eleef was validating the Windows wrapper in #23. After the npm shim was fixed, server add (and every other command) still exited at startup with:

Missing required dependencies: rsync

rsync was in the required list of the global check_dependencies gate alongside ssh, but it is only used by cmd_sync. Git for Windows / fresh MSYS2 setups don't ship rsync, so the CLI was unusable on a stock Windows install for users who never intend to call sync.

Changes

  • cli/lib/config.sh — drop rsync from the required list, add it to the optional warning. New require_command <cmd> <feature> helper prints actionable install hints (macOS / Debian / Windows).
  • cli/ssh-managercmd_sync now calls require_command rsync "ssh-manager sync" so the failure happens at the point of use with a clear message instead of blocking startup.
  • cli/install.sh — same reclassification in the installer's dependency probe (yellow warning, not red blocking error).

Only ssh itself remains in the required set.

Verified locally

Tested on macOS by running the CLI with a stripped PATH that contains ssh but not rsync:

Command Before After
ssh-manager --version exit 1 — Missing required dependencies: rsync exit 0
ssh-manager --help exit 1 exit 0
ssh-manager server list exit 1 exit 0 (yellow warning)
ssh-manager sync push ... exit 1, generic message exit 1, actionable message with install hints per OS
❌ 'rsync' is required for ssh-manager sync but was not found on PATH
ℹ️  Install rsync:
ℹ️    • macOS:   brew install rsync
ℹ️    • Debian:  sudo apt-get install rsync
ℹ️    • Windows: install via MSYS2/Cygwin, or use WSL

Test plan (Windows reviewer)

After #23 is merged (or stacked on this branch), on a stock Git-for-Windows install without rsync:

  • ssh-manager --version works
  • ssh-manager --help works
  • ssh-manager server add walks through the prompts to completion
  • ssh-manager server list shows the yellow Missing optional dependencies: rsync ... line but still lists servers
  • ssh-manager sync push <server> <src> <dst> fails with the new actionable error pointing at MSYS2/WSL

Relation to other PRs

…ync` (#22)

Reported by @Eleef while validating the Windows wrapper fix in #23. After
the wrapper started working, `server add` (and every other command) still
exited at startup with:

    Missing required dependencies: rsync

rsync was listed alongside `ssh` in the global `check_dependencies`
gate, but it is only used by `cmd_sync`. Git for Windows (and most
out-of-the-box MSYS2/Cygwin setups) does not ship rsync, so this gate
prevented the CLI from running at all on a fresh Windows install — even
for users who never intend to call `sync`.

Changes:
- `cli/lib/config.sh`: drop rsync from the required list, add it to the
  optional warning, and introduce a small `require_command` helper that
  prints actionable install hints (macOS/Debian/Windows).
- `cli/ssh-manager`: `cmd_sync` calls `require_command rsync` so the
  failure happens at the point of use with a clear message instead of
  blocking startup.
- `cli/install.sh`: same reclassification in the installer's dependency
  probe so users see a yellow warning, not a red blocking error.

Verified locally on macOS by stripping rsync from PATH:
  - `--version`, `--help`, `server list` → exit 0 (warn-only)
  - `sync push ...`                       → exit 1 with install hints

Closes the residual rsync issue surfaced in #22; complements #23.
@bvisible bvisible merged commit 970f729 into main May 2, 2026
@bvisible bvisible deleted the fix/rsync-optional branch May 2, 2026 16:55
bvisible added a commit that referenced this pull request May 2, 2026
Aggregates four bug fixes (#22 wrapper, #22 rsync, #25, #28) and one
feature (#24 ProxyCommand) merged today via PRs #23, #26, #27, #29, #24.

See CHANGELOG.md for full details.
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