Repository navigation
fix: make update --host actually push instead of printing instructions - #36
Merged
Merged
Conversation
update --host told the user to run ./install.sh --host, but install.sh might not exist (curl|sh users) and ./ is cwd-relative. Add push_to_remote(): reads own source, base64-encodes it, pipes it over SSH where a shell one-liner decodes it into the skill directory, sets the symlink, and reports the installed version. No internet needed on the remote — the file travels over the SSH connection. cmd_update now: - --check: report-only, no push (unchanged) - version matches: skip with "already current" - version differs or not installed: push_to_remote() Closes #27
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
cc-peer update --host web-01just reports the remote version and tells the user to run./install.sh --host web-01. But:install.shmight not exist (curl|shusers)./is cwd-relative, not a stable pathFix
Add
push_to_remote(host, ssh_opts)— reads own source, base64-encodes it, pipes it as stdin to an SSH command that decodes, writes to the skill directory, and reports the installed version. Same pattern asrun_remote()but writes a file instead of running a command.cmd_updateremote path now:--check: report-only, no push (unchanged)"already current", no pushpush_to_remote()No internet needed on the remote — the file travels over SSH.
Tests
test_builds_correct_ssh_command: verifies SSH command structure and version parsingtest_validates_host: security check on host argumenttest_update_host_pushes_when_outdated: push called when version differstest_update_host_skips_when_current: no push when version matchestest_update_host_check_reports_only:--checknever pushesCloses #27