Description
Cannot build a project using the Qt VS Code extension using CMake without PATH including ${env:PATH}
If Ninja is not installed and using Ninja provided by the Qt installation, specifying the Ninja directory alone (e.g., "PATH": "/Users/NAME/Qt/Tools/Ninja") does not allow the extension to locate Ninja. It only works correctly when appending the existing environment path using :${env:PATH} (e.g., "PATH": "/Users/ashwalton/Qt/Tools/Ninja:${env:PATH}").
Steps to Reproduce:
1. Configure the Extension:
In your VS Code settings or extension configuration file, set the PATH as follows:
"PATH": "/Users/USER/Qt/Tools/Ninja"
2. Execute a Command:
Run the build command via the CMake extension.
3. Observe the Failure:
The extension fails to locate Ninja, leading to an error:
CMake Warning at /Users/ashwalton/Qt/6.8.1/macos/lib/cmake/Qt6/Qt6Config.cmake:181 (find_package): Found package configuration file: /Users/ashwalton/Qt/6.8.1/macos/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake but it set Qt6Quick_FOUND to FALSE so package "Qt6Quick" is considered to be NOT FOUND.
4. Modify the PATH:
Change the configuration to:
"PATH": "/Users/ashwalton/Qt/Tools/Ninja:${env:PATH}"
5. Verify the Fix:
Run the same command. The extension now locates Ninja correctly.
Expected Behavior:
The extension should locate and use Ninja from the Qt installation even if the user doesn't have the environment variable set by installing Ninja standalone.
Actual Behavior:
Ninja is not found unless the current environment paths are explicitly appended using :${env:PATH}.
Environment Details:{}
•VS Code Version: 1.96.4
•Extension Version: 1.3.0
•Operating System: macOS
It seems that the extension does not automatically merge the provided path with the existing system PATH. This behavior forces users to manually append ${env:PATH} to ensure proper functionality.