Skip to content

[vcpkg toolchain] Fix paths with special characters#24463

Merged
BillyONeal merged 3 commits intomicrosoft:masterfrom
JackBoosY:dev/jack/24447
May 2, 2022
Merged

[vcpkg toolchain] Fix paths with special characters#24463
BillyONeal merged 3 commits intomicrosoft:masterfrom
JackBoosY:dev/jack/24447

Conversation

@JackBoosY
Copy link
Copy Markdown
Contributor

When using execute_process and add_custom_command, the path included in the command line with special characters will break the execution process.

Fixes #24447.

@JackBoosY JackBoosY added category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:internal labels Apr 28, 2022
@JackBoosY
Copy link
Copy Markdown
Contributor Author

@ResearchDaniel Can you please test this PR?

Thanks.

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Apr 28, 2022

This change doesn't make sense. Fortunately, it failed early.

@ResearchDaniel
Copy link
Copy Markdown

ResearchDaniel commented Apr 28, 2022

I think that the quotes need to be escaped inside of the other quotes? For example:
"\”${Z_VCPKG_BOOTSTRAP_SCRIPT}\"”

Edit: The suggestion by @dg0yt to add the VERBATIM option to add_custom_command is better

@JackBoosY
Copy link
Copy Markdown
Contributor Author

@ResearchDaniel I think now it's okay?

@LilyWangLL LilyWangLL added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Apr 29, 2022
@ResearchDaniel
Copy link
Copy Markdown

@ResearchDaniel I think now it's okay?

tested your branch and it seems to work.

@BillyONeal
Copy link
Copy Markdown
Member

This change doesn't make sense. Fortunately, it failed early.

Do you think the current one makes sense?

@BillyONeal BillyONeal closed this May 2, 2022
@BillyONeal BillyONeal reopened this May 2, 2022
@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented May 2, 2022

This change doesn't make sense. Fortunately, it failed early.

Do you think the current one makes sense?

Well, now it is what I proposed, and what CMake doc recommends.
(What didn't make sense was removing quotes which were needed for CMake syntax.)

@BillyONeal
Copy link
Copy Markdown
Member

Well, now it is what I proposed, and what CMake doc recommends.

Sorry, I didn't see such a proposal.

@BillyONeal BillyONeal merged commit f30786c into microsoft:master May 2, 2022
@BillyONeal
Copy link
Copy Markdown
Member

@JackBoosY Thanks for the fix :)

Jimmy-Hu added a commit to Jimmy-Hu/vcpkg that referenced this pull request May 3, 2022
[vcpkg toolchain] Fix paths with special characters (microsoft#24463)
@JackBoosY JackBoosY deleted the dev/jack/24447 branch May 5, 2022 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mac: applocal.py post-build step fails if executable name contains parenthesis

5 participants