Skip to content

Conversation

@Gold872
Copy link
Contributor

@Gold872 Gold872 commented Feb 2, 2026

Fixes issue where cmake executable couldn't be found on windows after parsing VS environment variables

@rainyl
Copy link
Owner

rainyl commented Feb 3, 2026

@Gold872 Thanks for your contribution~

I am wondering why it's necessary to pass env vars explicitly? according to the doc, includeParentEnvironment is true by default and the child process should inherit the parent (the current dart program) env vars, please explain more and paste the error message if possible.

@Gold872
Copy link
Contributor Author

Gold872 commented Feb 3, 2026

To preface, this is from my testing on windows where cmake isn't in the path by default

At the start of the build, several environment variables are loaded through visual studio exectuables, which are used to find the cmake executable. The problem is during build, it uses the where command to find cmake, and through the default windows path, this isn't possible, so the extra visual studio environment variables are needed to allow the where command to find cmake.

The full error message I got was extremely long, but essentially it was saying that the cmake executable could not be found by the where command

@rainyl
Copy link
Owner

rainyl commented Feb 3, 2026

Okay, that makes sense, thanks~

I will update the package version to 0.2.3 and merge it.

@rainyl rainyl merged commit 74e2d8f into rainyl:main Feb 3, 2026
@rainyl
Copy link
Owner

rainyl commented Feb 3, 2026

Thanks again 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.

2 participants