fix(tree): use native Windows flags#2184
Open
cuong21951 wants to merge 1 commit into
Open
Conversation
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.
What
Fix
tk tree on Windows by routing arguments through a platform-specific adapter before spawning native ree.
On Unix, RTK keeps the existing behavior and injects -I so noisy folders stay out of the output. On Windows, RTK now avoids Unix-only options and uses the native ree.com slash flags instead:
The Windows filter also removes the ree.com banner lines before returning output to the agent.
Why
Windows ships ree.com, which does not support Unix ree flags like -I or --all. RTK was injecting the Unix ignore pattern unconditionally, so
tk tree failed with:
ext Too many parameters - node_modules|.git|target|...Fixes #1936.
Addresses the tree-specific part of #1949.
Validation
ext rtk cargo fmt --all --check rtk cargo test cmds::system::tree -- --nocapture rtk cargo clippy --all-targets rtk proxy .\target\debug\rtk.exe tree target\tree-repro-windowsTargeted results:
ext cargo test: 9 passed, 1983 filtered out cargo clippy: No issues foundManual Windows smoke output now renders the test tree instead of the parameter error:
ext C:\USERS\CUONG\RTK\TARGET\TREE-REPRO-WINDOWS +---src | main.rs | \---target noise.txtFull
tk cargo test still has existing unrelated Windows failures in core::stream::tests where Unix commands such as rue, alse, and cat are not found.