Skip to content
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

[PublishCodeCoverageResultsV1] Fix paths with spaces #13975

Conversation

DaniilShmelev
Copy link
Contributor

@DaniilShmelev DaniilShmelev commented Nov 25, 2020

Task name: PublishCodeCoverageResults@1

Description: Fix error when paths contain spaces on windows
Successful pipeline runs:
windows self-hosted with spaces
centos self-hosted with spaces

Documentation changes required: N

Added unit tests: N

Attached related issue: #13062

Checklist:

  • Task version was bumped - please check instruction how to do it
  • Checked that applied changes work as expected

@DaniilShmelev DaniilShmelev merged commit 4d8624d into master Nov 30, 2020
zhenghao104 pushed a commit that referenced this pull request Dec 4, 2020
* remove windowsVerbatimArguments: true

* bump task version
@DaniilShmelev
Copy link
Contributor Author

Note about this change: when spawning a process in Linux, you pass an array of strings, and you don't have to worry about any meta-characters in them; on the other hand, in windows, you pass an entire string, so you have to escape any metacharacters yourself. windowsVerbatimArguments=true prevents toolrunner from escaping any of those characters, including spaces, so if any specified path includes spaces, windows will not recognize it as a single argument.
Why this line was here in the first place is unclear, but to me, it looks like an honest mistake.

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.

3 participants