Open bkleineibst opened 9 months ago
@bkleineibst I might look into adjusting this at a later time, but for now you can disable the manage VsCode settings by adding updateVscodeSettings
to false on the .fvmrc
Thanks @leoafarias
Regarding https://github.com/leoafarias/fvm/issues/642#issuecomment-1959787353:
Comments are not part of the JSON specification. Therefore, it will not be supported.
It's worth mentioning that vscode does support comments in their settings files by using jsonc under the hood https://code.visualstudio.com/docs/languages/json#_json-with-comments:
VS Code also has a JSON with Comments (jsonc) mode. This mode is used for the VS Code configuration files such as settings.json, tasks.json, or launch.json
Thanks @jibbers42 I did not find any existing dart package that supports not only reading but also writing back of json with comments, so will have to do further research on this later.
But for anyone else having this issue here is a workaround
Comments are not part of the JSON specification. Therefore, are not supported. However, if you choose to comment, I suggest doing the following:
{
"_comment": "This is the basic data",
"key": "value"
}
This would allow valid comments with json
Before creating a bug report please make check the following
pub cache repair
. Close the terminal and try again.administrator
or withdeveloper
permissions.fvm doctor
if possible and add the output to the issue.Describe the bug When running
fvm use
, the settings.json file is update to set the new version to use. However, comments are removed from the file and tabs are changed to spaces.To Reproduce Steps to reproduce the behavior:
fvm use stable
Expected behavior Only the version number should be changed. Tab/space indentation should match rest of file.