We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e31cb45 commit 10bb76eCopy full SHA for 10bb76e
scripts/launch_r.sh
@@ -1,13 +1,12 @@
1
#!/usr/bin/env bash
2
-export LD_PRELOAD=/workspaces/r-dev-env/scripts/allow_ptrace.so
+# Preload helper for ptrace
3
+export LD_PRELOAD="$(dirname "$0")/allow_ptrace.so"
4
-# If the first argument is a file, use that as R_BINARY; otherwise default.
5
-if [ -x "$1" ]; then
6
- R_BINARY="$1"
7
- shift
+# VS Code sets the env var R_RPATH_LINUX to the path from r.rpath.linux
+if [ -n "${R_RPATH_LINUX:-}" ] && [ -x "$R_RPATH_LINUX" ]; then
+ R_BINARY="$R_RPATH_LINUX"
8
else
9
R_BINARY="/usr/bin/R"
10
fi
11
12
-# Exec R with all remaining arguments
13
exec "$R_BINARY" "$@"
0 commit comments