reksar / SpaceEngineers

Space Engineers game scripts
30 stars 21 forks source link

Variable ${config:git.path} can not be resolved #5

Open BeeKeepGaming opened 1 month ago

BeeKeepGaming commented 1 month ago

I still new to vs Code please help out

reksar commented 1 month ago

Ideally, it should be automatically resolved to the empty value in this case. Any PR is welcome.

In the meantime, try to set it manually by adding the "git.path": "...\\path\\to\\your\\git.exe" to your VS Code settings.json.

BeeKeepGaming commented 1 month ago

Thanks in the mean time while I added it I also played around with it and it seems to work if you remove ${config:git.path} and just leave it blank.

reksar commented 1 month ago

OK, so now we already have 2 options)

I can't test it now, but I would like to find a way to resolve this like ${some_non_existent_var:-} in bash. Instead of just removing.

BeeKeepGaming commented 1 month ago

how about "git_path": "$//git.exe" it still works

reksar commented 1 month ago

If I remember correctly, git_path is only used in the batch script, so it can be empty and there is no need to specify it in the json. But git.path - is a VS Code var that should be resolved to the default empty string if not set manually.

If ${config:git.path} is not set, it should resolve to an empty string, which is then passed to git_path. This is the same as if git_path is omitted in the json. In this case, the batch script will search for the system Git.