diff --git a/frontend/providers/devbox/components/modals/JetbrainsGuideModal.tsx b/frontend/providers/devbox/components/modals/JetbrainsGuideModal.tsx index e854cf1ac..e9d7e7f33 100644 --- a/frontend/providers/devbox/components/modals/JetbrainsGuideModal.tsx +++ b/frontend/providers/devbox/components/modals/JetbrainsGuideModal.tsx @@ -78,8 +78,6 @@ const JetBrainsGuideModal = ({ ); const data = await res.json(); - setOnConnecting(true); - const controller = new AbortController(); controllerRef.current = controller; @@ -92,7 +90,7 @@ const JetBrainsGuideModal = ({ const execDownloadCommand = ` IDE_DIR="${basePath}/.cache/JetBrains/${idePathName}${version}"; - if [ -d "$IDE_DIR" ] && [ ! -f "$IDE_DIR/${selectedIDE.binName}" ]; then + if [ -d "$IDE_DIR" ] && [ ! -f "$IDE_DIR/bin/${selectedIDE.binName}" ]; then rm -rf "$IDE_DIR"; fi; [ ! -d ${basePath}/.cache/JetBrains/${idePathName}${version} ] && mkdir -p ${basePath}/.cache/JetBrains/${idePathName}${version} && wget -q --show-progress --progress=bar:force -O- ${downloadLink} | tar -xzC ${basePath}/.cache/JetBrains/${idePathName}${version} --strip-components=1 && chmod -R 776 ${basePath}/.cache && chown -R devbox:devbox ${basePath}/.cache`; @@ -112,6 +110,9 @@ const JetBrainsGuideModal = ({ if (progress) { setProgress(progress); } + if (progress && progress === 1) { + setOnConnecting(true); + } }, signal: controller.signal }); @@ -128,7 +129,7 @@ const JetBrainsGuideModal = ({ setProgress(0); setOnConnecting(false); } - }, [selectedIDE, jetbrainsGuideData.devboxName, connectIDE]); + }, [selectedIDE, jetbrainsGuideData.devboxName, connectIDE, jetbrainsGuideData.workingDir]); return (