-
Notifications
You must be signed in to change notification settings - Fork 1
Add -C option to change working directory #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Call os.Chdir(workDir) early in run and return an error if it fails Add an empty prompt.md placeholder
|
@copilot add a short test. |
* Initial plan * Add test for -C option to change working directory Co-authored-by: alexec <1142830+alexec@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a -C (change directory) flag that allows the application to change to a specified working directory before processing prompts and tasks. This enables running the tool from a different location while operating on files in a target directory.
Key changes:
- Added a new
workDirflag that defaults to the current directory - Implemented directory change logic at the start of the
run()function - Added comprehensive integration test coverage for the new functionality
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| main.go | Added workDir variable, -C flag registration, and directory change logic |
| integration_test.go | Added integration test to verify the -C flag works correctly with relative paths |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Call os.Chdir(workDir) early in run and return an error if it fails Add an empty prompt.md placeholder