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

Add quotes around the VCPKG_ROOT and Z_POWERSHELL_EXE variable path assignments. #1354

Merged
merged 1 commit into from
Feb 27, 2024
Merged

Add quotes around the VCPKG_ROOT and Z_POWERSHELL_EXE variable path assignments. #1354

merged 1 commit into from
Feb 27, 2024

Conversation

jcbrill
Copy link
Contributor

@jcbrill jcbrill commented Feb 26, 2024

Add quotes around the VCPKG_ROOT and Z_POWERSHELL_EXE variable path assignments.

Without adding quotes around the set variable path assignments, paths that contain a close parenthesis character ) would cause the command/batch file to exit prematurely and vs batch call chains (e.g., vcvarsall.bat) to fail.

…ssignments.

Without adding quotes around the set variable path assignments, paths that contain a close parenthesis character `)` would cause the command/batch file to exit prematurely and vs batch call chains (e.g., vcvarsall.bat) to fail.
@jcbrill
Copy link
Contributor Author

jcbrill commented Feb 26, 2024

For testing with VS2022:

  • vcpkg-init.ps1 was renamed to vcpkg-init.cmd.
  • The internal paths were updated to those in the original VS2022 file.
  • The signature block from the original VS022 file was added.
  • The modified vcpkg-init.cmd file was copied into %VSINSTALLDIR%\vc\vcpkg.

All four assignments were tested locally with:

  • VS2022 installed into C:\Program Files (x86)
  • Powershell path of C:\Program Files (x86)\WindowsPowerShell\v1.0
  • USERPROFILE path of C:\Users (x86)\test
  • Running VS2022 vcvarsall.bat works as expected.

Issue description and discussion:
#988 (comment)

@BillyONeal BillyONeal merged commit 8e0de0c into microsoft:main Feb 27, 2024
5 checks passed
@BillyONeal
Copy link
Member

Thanks for the well written description of the problem and the fix!

@jcbrill jcbrill deleted the jbrill-vcpkg-init branch February 27, 2024 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants