From af1efd6c3b88214779ca3241c0e1cc72675d6cb5 Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Tue, 31 Dec 2024 11:55:26 +0100 Subject: [PATCH] make the cache mount backwards compatible --- lsp/Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lsp/Dockerfile b/lsp/Dockerfile index c94b321c3e5be..88a2253653e2c 100644 --- a/lsp/Dockerfile +++ b/lsp/Dockerfile @@ -42,7 +42,6 @@ RUN pip3 install tornado python-lsp-jsonrpc ruff-lsp COPY --from=denoland/deno:2.1.2 --chmod=755 /usr/bin/deno /usr/bin/deno RUN mkdir -p /pyls/.cache -RUN ln -s /pyls/.cache /root/.cache WORKDIR /pyls COPY Pipfile . @@ -56,9 +55,8 @@ RUN mkdir -p /tmp/monaco && chmod -R 777 /tmp/monaco RUN cd /tmp/monaco && npm install --save-dev windmill-client RUN chmod -R a+rX /usr/local && \ - chmod -R a+rX /pyls && \ - chmod -R a+rX /root/.cache + chmod -R a+rX /pyls EXPOSE 3001 -CMD ["python3", "pyls_launcher.py"] +CMD ["sh", "-c", "if [ -d /root/.cache ]; then export XDG_CACHE_HOME=/root/.cache && cp -r /pyls/.cache /root/.cache; fi && python3 pyls_launcher.py"]