feat(pull,push): match ares-cli path rules - #13
Merged
Conversation
ares-cli picks the layout from what DESTINATION already is, not from a trailing "/". A directory keeps its own name under DESTINATION, and a lone file keeps its name only when DESTINATION is a directory. Push now also errors when several SOURCEs go onto a file, and makes missing parents. -i/--ignore now means "hide the detailed copy messages", as in ares-cli. Continue-on-error moves to the new -k/--keep-going. Extensions past ares-cli gaps: pull to a path with a missing parent works, pull skips a broken symlink and stops at 64 levels of nesting, and push skips a symlink to a directory instead of failing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
ares-pushandares-pullused a trailing/on DESTINATION to decide thelayout.
@webosose/ares-cliignores the trailing slash and reads the layoutfrom what DESTINATION already is. This aligns both.
Path rules
DEST/<name>DEST/<name>DESTDEST/<name>eachSo
ares-push build /media/developer/appsnow lands at/media/developer/apps/build, as in ares-cli. Before it copied the contentsinto
/media/developer/apps.Flags
-i, --ignorenow means "Hide the detailed copy messages", which is whatares-cli documents. Continue-on-error moves to a new
-k, --keep-going.Breaking: scripts using
-ito keep going need-k.Other compat fixes
mkdir -p, with a cache soit does not re-stat per file.
find -followdoes in ares-cli.stat, so a missing source reports"does not exist on the device".
Extensions past ares-cli gaps
ENOENTfromlstatSync.nesting instead of looping.
findormkdir.Not changed
Output stays
src => dst. ares-cli printsPush:src -> dstplus aN file(s) pushedsummary, but no other tool in this repo copies ares-clioutput.
Test
cargo test -p ares-pull -p ares-push— 14 tests, covering the path tableabove and the device-path parent walk.
🤖 Generated with Claude Code