Skip to content

Resolve exec prompt files relative to --cwd#326

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-exec-relative-file-cwd
Open

Resolve exec prompt files relative to --cwd#326
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-exec-relative-file-cwd

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Fixes PlatformNetwork/bounty-challenge#53169.

Summary

  • Resolve relative cortex exec --file paths against --cwd when a working directory is provided.
  • Keep absolute --file paths unchanged and preserve existing relative behavior when --cwd is omitted.
  • Add regression coverage for each path resolution case.

Validation

  • cargo +1.90.0 fmt --package cortex-cli --check
  • git diff --check
  • Isolated rustc +1.90.0 --edition=2024 --test harness covering relative-with-cwd, relative-without-cwd, and absolute path resolution

Note: targeted cargo test -p cortex-cli resolves_relative_prompt_file_against_cwd -- --nocapture is still blocked before running tests on this Windows/MSVC environment by the existing aws-lc-sys C build failure.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

[BUG][v0.0.7] exec resolves relative --file against process CWD, not --cwd

1 participant