Search for compilerPath in the PATH environment variable
A customer suggested this feature in an extension review. If compilerPath is not an absolute path to a compiler, we could see if it is in the PATH and determine the absolute path ourselves.
Thank you for creating this issue 🙏🏻 many other VSCODE extensions that work with CPPTools have a problem with this and cannot create independent extensions. e.g. take a look at here I believe it could be better that all paths in the json config have access to the PATH environment variable.
@bobbrow Should the env path also be checked for a default compiler? That may have an impact on launch time, as checking for N different names in path could be slow for some users.
We already check the env path during the search for default compilers on linux/mac. This issue is just about resolving compilerPath in c_cpp_properties.json so that if you put 'g++' in there, we call 'which' on it and get the absolute path before sending the configuration across to the language server.
Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/1.0.0