Skip to content

fix(tree): use native Windows flags#2184

Open
cuong21951 wants to merge 1 commit into
rtk-ai:developfrom
cuong21951:fix/windows-tree-native-flags
Open

fix(tree): use native Windows flags#2184
cuong21951 wants to merge 1 commit into
rtk-ai:developfrom
cuong21951:fix/windows-tree-native-flags

Conversation

@cuong21951
Copy link
Copy Markdown

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:

  • /F so files are included in the tree output
  • /A so output uses stable ASCII characters

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-windows

Targeted results:

ext cargo test: 9 passed, 1983 filtered out cargo clippy: No issues found

Manual 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.txt

Full
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.

@cuong21951 cuong21951 mentioned this pull request May 31, 2026
@cuong21951 cuong21951 marked this pull request as ready for review May 31, 2026 11:57
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.

A bug with tree

1 participant