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

feat(win): allow VCINSTALLDIR to specify a portable instance #3036

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

legendecas
Copy link
Member

Checklist
  • npm install && npm run lint && npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change

When node-gyp is running in a developer command prompt from a portable enterprise VS instance, allow node-gyp to use the specified instance instead of reporting that the instance found from the VSInstaller doesn't match the environ VCINSTALLDIR. Tools like CMake can use a portable VS instance as well: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6651.

@legendecas legendecas changed the title win: allow VCINSTALLDIR to specify a portable instance feat(win): allow VCINSTALLDIR to specify a portable instance May 29, 2024
Copy link
Contributor

@StefanStojanovic StefanStojanovic left a comment

Choose a reason for hiding this comment

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

This looks reasonable. A few things are assumed, so they are a weak spot, but I guess there is not much we can do about it?

@cclauss cclauss requested a review from StefanStojanovic June 25, 2024 09:46
@legendecas
Copy link
Member Author

@StefanStojanovic thanks for the review. While trusting what the VS developer command prompt sets in the environment variables, the VisualStudioFinder also checks if the needed commands exist, like in https://github.com/nodejs/node-gyp/blob/main/lib/find-visualstudio.js#L380-L381.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants