Open marthinsen opened 11 months ago
Using the current settings.json in VS Code on Windows:
{ "cmakeFormat.args": [ "--config-file", "${workspaceFolder}/CMake/cmake-format.yaml" ] }
the ${workspaceFolder} will be prepended with a leading slash which cmake-format is not able to understand and fail with the error message: CRITICAL __main__.py:635: Desired config file does not exist: /c:/path/to/workspace/CMake/cmake-format.yaml
CRITICAL __main__.py:635: Desired config file does not exist: /c:/path/to/workspace/CMake/cmake-format.yaml
The error seems to be that path is used here instead of fsPath: https://github.com/cheshirekow/cmake_format/blob/eff5df1f41c665ea7cac799396042e4f406ef09a/cmakelang/vscode_extension/src/extension.ts#L39C5-L39C5 Difference between path and fsPath: https://code.visualstudio.com/api/references/vscode-api#Uri.fsPath
Using the current settings.json in VS Code on Windows:
the ${workspaceFolder} will be prepended with a leading slash which cmake-format is not able to understand and fail with the error message:
CRITICAL __main__.py:635: Desired config file does not exist: /c:/path/to/workspace/CMake/cmake-format.yaml
The error seems to be that path is used here instead of fsPath: https://github.com/cheshirekow/cmake_format/blob/eff5df1f41c665ea7cac799396042e4f406ef09a/cmakelang/vscode_extension/src/extension.ts#L39C5-L39C5 Difference between path and fsPath: https://code.visualstudio.com/api/references/vscode-api#Uri.fsPath