Use Windows registry to find R path#252
Conversation
63486e0 to
b351eed
Compare
|
I tested this on my Windows 10 VM and it works as expected. To test, please download the build at https://github.com/Ikuyadeu/vscode-R/actions/runs/49221093 or see the artifacts in the details of main / build (pull_request). |
|
@renkun-ken I tried testing this just now on Windows 10, but no success I'm afraid. Testing using VSIX file: Just to check, I also tested by running your Not sure if it helps, but this is what my registry looks like: Full key is like |
|
I test with the VSIX at https://github.com/Ikuyadeu/vscode-R/actions/runs/49233584 and it works perfectly on my Windows 10. My registry looks like |
|
@andycraig We use |
|
@renkun-ken Looks like that's the issue in my case. |
|
@andycraig I see. I'm not sure if newer versions of R will write to both We are using almost the same code as in vscode-r-lsp and its default value. Therefore we are consistent with it too. If user does not have the R executable path correctly written in |
|
@ksq Thank you for testing! @renkun-ken Yeah, the version of R I have installed on Windows is old so that could well be it. It worked for @ksq, and for me it displayed the appropriate error message. The README is very clear as well. I am happy with it as-is. Please merge it if you have no additional changes. Thank you for this PR! It will make it simpler for new users. |


What problem did you solve?
Closes #244
(If you do not have screenshot) How can I check this pull request?
If a Windows user installs R with default installation settings, the R path will be added to registry. So that user does not have to specify R executable in this case.
To test it, set
rterm.windowsto empty (now it's empty by default), runCreate R Terminaland see if it could properly find R path and create a terminal with it.Another thing to test is that if multiple versions are installed, the registry will contain multiple entries of R paths. Although the registry entry will have multiple subentries in this case, the value of the key should be the last installed version.