Skip to content

solve issue with running tool when there are spaces in its path#1988

Merged
arturcic merged 5 commits intoGitTools:mainfrom
denisbredikhin:exec-fix
Mar 16, 2026
Merged

solve issue with running tool when there are spaces in its path#1988
arturcic merged 5 commits intoGitTools:mainfrom
denisbredikhin:exec-fix

Conversation

@denisbredikhin
Copy link
Copy Markdown
Contributor

Switch from child_process exec to execFile
Solves #1912

Copilot AI review requested due to automatic review settings March 10, 2026 13:49
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 updates the build agent command execution helper to avoid Windows failures when the executable path contains spaces (as reported in #1912) by moving away from shell-based execution.

Changes:

  • Replace child_process.exec with child_process.execFile to execute binaries directly (avoids path/quoting issues).
  • Normalize stdout/stderr to strings for consistent ExecResult output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@arturcic arturcic self-assigned this Mar 10, 2026
@arturcic arturcic linked an issue Mar 13, 2026 that may be closed by this pull request
2 tasks
@arturcic
Copy link
Copy Markdown
Member

@denisbredikhin please rebase the pr onto main

@sonarqubecloud
Copy link
Copy Markdown

@arturcic arturcic merged commit aa5b939 into GitTools:main Mar 16, 2026
15 checks passed
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 16, 2026

Thank you @denisbredikhin for your contribution!

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.

[ISSUE]: gitversion-execute@4.2.0 fails on Windows (with self hosted agent?)

4 participants