Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

Adds test coverage for the -C flag that changes the working directory before processing.

Test Coverage

  • TestWorkDirOption validates that -C correctly changes to the specified directory
  • Uses relative paths for memory/task locations to verify the directory change takes effect
  • Confirms output is generated correctly with content from the relocated working directory
// Run with -C to change directory, then use relative paths
cmd = exec.Command(binaryPath, "-C", workDir, "-m", ".prompts/memories", "-t", ".prompts/tasks", "-o", outputDir, "task")

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Copilot AI changed the title [WIP] Add -C option to change working directory Add test for -C option to change working directory Nov 1, 2025
Copilot AI requested a review from alexec November 1, 2025 02:08
@alexec alexec marked this pull request as ready for review November 1, 2025 02:12
@alexec alexec merged commit 8452e38 into chdir Nov 1, 2025
@alexec alexec deleted the copilot/sub-pr-31 branch November 1, 2025 02:12
alexec added a commit that referenced this pull request Nov 1, 2025
* Add -C option to change working directory

Call os.Chdir(workDir) early in run and return an error if it fails Add
an empty prompt.md placeholder

* Add test for -C option to change working directory (#32)

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

* Update main.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update main.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

2 participants