From b60890c0647a6391360b96d15fd3bac2a19337b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=AE=E0=AE=A9=E0=AF=8B=E0=AE=9C=E0=AF=8D=E0=AE=95?= =?UTF-8?q?=E0=AF=81=E0=AE=AE=E0=AE=BE=E0=AE=B0=E0=AF=8D=20=E0=AE=AA?= =?UTF-8?q?=E0=AE=B4=E0=AE=A9=E0=AE=BF=E0=AE=9A=E0=AF=8D=E0=AE=9A=E0=AE=BE?= =?UTF-8?q?=E0=AE=AE=E0=AE=BF?= Date: Fri, 19 Jul 2024 13:00:19 +0530 Subject: [PATCH] Fix playwright cache error during container restart (#3011) --- containers/app/entrypoint.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) mode change 100755 => 100644 containers/app/entrypoint.sh diff --git a/containers/app/entrypoint.sh b/containers/app/entrypoint.sh old mode 100755 new mode 100644 index 565925456fab..26db649f5bd0 --- a/containers/app/entrypoint.sh +++ b/containers/app/entrypoint.sh @@ -22,7 +22,9 @@ if [[ "$SANDBOX_USER_ID" -eq 0 ]]; then echo "Running OpenDevin as root" export RUN_AS_DEVIN=false mkdir -p /root/.cache/ms-playwright/ - mv /home/opendevin/.cache/ms-playwright/ /root/.cache/ + if [ -d "/home/opendevin/.cache/ms-playwright/" ]; then + mv /home/opendevin/.cache/ms-playwright/ /root/.cache/ + fi "$@" else echo "Setting up enduser with id $SANDBOX_USER_ID" @@ -52,7 +54,9 @@ else mkdir -p /home/enduser/.cache/huggingface/hub/ mkdir -p /home/enduser/.cache/ms-playwright/ - mv /home/opendevin/.cache/ms-playwright/ /home/enduser/.cache/ + if [ -d "/home/opendevin/.cache/ms-playwright/" ]; then + mv /home/opendevin/.cache/ms-playwright/ /home/enduser/.cache/ + fi usermod -aG $DOCKER_SOCKET_GID enduser echo "Running as enduser"