Vscode-cmake-tools: Should use ${SystemRoot} ${ProgramFiles} ${SystemDrive} instead of "C:\\Windows" "C:\\Program Files" "C:".

Created on 8 Nov 2019  路  11Comments  路  Source: microsoft/vscode-cmake-tools

Not every Windows PC uses C as system drive letter. Please replace C:\\Windows C:\\Program Files C:\\Program Files (x86) C: to ${SystemRoot} ${ProgramFiles} ${ProgramFiles(x86)} ${SystemDrive}, thanks.

kits bug fixed (release pending)

Most helpful comment

Yes, we should fix this.

All 11 comments

Hi @bobbrow, the source files shown in the following screenshot hardcode C:\\ as Windows system drive, which may bring inconvenience to the users whose Windows system drive is not C:\\. They should use ${SystemRoot} ${ProgramFiles} ${ProgramFiles(x86)} ${SystemDrive} instead.

image

Yes, we should fix this.

@bobbrow Would it be necessary to add these variables to the extension: ${SystemRoot} ${ProgramFiles} ${ProgramFiles(x86)} ${SystemDrive} or should I just use process.env to get the system paths as necessary?

Sorry that I was unclear on this one. I wasn't planning on adding new variables for this. I was agreeing that we should get them from the environment.

@bobbrow I'll submit a PR to fix this issue later.

@andreeis Didn't you merge the fix for this?

Yes, this was fixed. The replacement PR didn't link back to this issue. @andreeis can you make sure this was added to the CHANGELOG?

Yes, it's mentioned:

  • Use variables instead of hardcoded values for system path references. PR #1690

Cool. Looks like we can put the issue number in there instead of the PR now.

Yes definitely, will do with my next PR.

CMake Tools 1.7.0 was released today and it contains a fix for this issue. Upgrade the extension in VSCode and let us know if you encounter any other problems.

Was this page helpful?
0 / 5 - 0 ratings