Skip to content

Commit 5bc250b

Browse files
committed
Update r.rterm.linux setting to use the launch_r.sh script with full dynamic path
1 parent 0f93b02 commit 5bc250b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"r.lsp.diagnostics": false,
2828
"r.plot.useHttpgd": true,
2929
"r.rpath.linux": "/usr/bin/R",
30-
"r.rterm.linux": "/workspaces/r-dev-env/scripts/launch_r.sh",
30+
"r.rterm.linux": "/usr/bin/R",
3131
"terminal.integrated.sendKeybindingsToShell": true,
3232
"svn.multipleFolders.enabled": true,
3333
"workbench.editorAssociations": {

scripts/localscript.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ if [ -f "$DEVCONTAINER_JSON" ]; then
3737
jq '.customizations.vscode.settings' "$DEVCONTAINER_JSON" > "$VSCODE_DIR/settings.json"
3838
fi
3939

40+
# Update r.rterm.linux setting to use the launch_r.sh script with full dynamic path
41+
if [ -f "$VSCODE_DIR/settings.json" ]; then
42+
tmpfile="${VSCODE_DIR/settings.json}.tmp.$$"
43+
jq --arg rterm "$WORK_DIR/scripts/launch_r.sh" '."r.rterm.linux"=$rterm' "$VSCODE_DIR/settings.json" > "$tmpfile" && mv "$tmpfile" "$VSCODE_DIR/settings.json"
44+
fi
45+
4046
# Build the ptrace helper library
4147
gcc -shared -fPIC -o "$WORK_DIR/scripts/allow_ptrace.so" "$WORK_DIR/scripts/allow_ptrace.c"
4248

0 commit comments

Comments
 (0)