Skip to content

Commit 05ea454

Browse files
authored
Merge pull request #177 from andycraig/issue-176-session-windows
Fix session watcher init.R path on Windows
2 parents 51d752b + 6f3b591 commit 05ea454

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ An opt-in experimental R session watcher is implemented to support the following
7777
To enable this feature, turn on `r.sessionWatcher` and append the following code to your `.Rprofile` (in your home directory):
7878

7979
```r
80-
source(file.path(Sys.getenv(if (.Platform$OS.type == "windows") "HOMEPATH" else "HOME"), ".vscode-R", "init.R"))
80+
source(file.path(if (.Platform$OS.type == "windows") file.path(Sys.getenv("HOMEDRIVE"), Sys.getenv("HOMEPATH")) else Sys.getenv("HOME"), ".vscode-R", "init.R"))
8181
```
8282

8383
This script writes the metadata of symbols in the global environment and plot file to `${workspaceFolder}/.vscode/vscode-R/PID` where `PID` is the R process ID. It also captures user input and append command lines to `${workspaceFolder}/.vscode/vscode-R/response.log`, which enables the communication between vscode-R and a live R sesson.

0 commit comments

Comments
 (0)