Skip to content

fix(build): quote paths passed to dotnet test - #36

Merged
xperiandri merged 1 commit into
mainfrom
fix/quote-dotnet-test-paths
Oct 2, 2026
Merged

xperiandri merged 1 commit into
mainfrom
fix/quote-dotnet-test-paths

Conversation

@xperiandri

Copy link
Copy Markdown
Collaborator

Proposed Changes

DotnetTest built the dotnet test command by concatenating the test project path and the TestResults directory into the raw argument string of DotNet.exec, which splits it like a command line. In a checkout path with spaces each path became several arguments, so dotnet test could not find the project and the test run failed. Both paths are now wrapped with the existing quoted helper, which moves out of DocsTool so the test target can share it. Copilot code review found the same issue in the copy of this build script in fsprojects/FSharp.Control.R3#21.

Types of changes

What types of changes does your code introduce to FSharp.Azure.Cosmos?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

🤖 Generated with Claude Code

`DotnetTest` concatenated the test project and the results directory into
the raw argument string of `DotNet.exec`, which splits it like a command
line, so in a checkout path with spaces each path became several arguments
and `dotnet test` failed. Quote both paths with the `quoted` helper the
documentation commands already use, moved out of `DocsTool` to share it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 2, 2026 21:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused change correctly addresses argument splitting while preserving existing behavior.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes test execution when repository paths contain spaces.

Changes:

  • Moves the shared quoted helper to module scope.
  • Quotes test project and results-directory paths passed to dotnet test.
File Description
build/​build.fs Safely quotes filesystem paths in test command arguments.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@xperiandri xperiandri mentioned this pull request Oct 2, 2026
3 of 6 tasks
@xperiandri
xperiandri merged commit 25f3235 into main Oct 2, 2026
8 checks passed
@xperiandri
xperiandri deleted the fix/quote-dotnet-test-paths branch October 2, 2026 22:49
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