Skip to content

Commit b56e543

Browse files
authored
Merge pull request #518 from dibryant/rstudio-fix
Allow runtime script to cp the package from bin to Rpackage default path
2 parents 6aa55c9 + 93d4a57 commit b56e543

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rstudio/c9s-python-3.9/run-rstudio.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ fi
1616

1717
# Create lib folders if it does not exist
1818
mkdir -p /opt/app-root/src/Rpackages/4.3
19-
cp -r /opt/app-root/bin/Rpackages/4.3/* /opt/app-root/src/Rpackages/4.3/
19+
for package in /opt/app-root/bin/Rpackages/4.3/*/;
20+
do
21+
package_folder=$(basename "$package")
22+
if [ ! -d "/opt/app-root/src/Rpackages/4.3/$package_folder" ]; then
23+
cp -r /opt/app-root/bin/Rpackages/4.3/$package_folder /opt/app-root/src/Rpackages/4.3/
24+
fi
25+
done
2026
# rstudio terminal cant see environment variables set by the container runtime
2127
# (which breaks kubectl, to fix this we store the KUBERNETES_* env vars in Renviron.site)
2228
env | grep KUBERNETES_ >> /usr/lib64/R/etc/Renviron.site

0 commit comments

Comments
 (0)