Skip to content

Commit

Permalink
fix(devbox): jb bug download circle (#5354)
Browse files Browse the repository at this point in the history
* fix: bug

* chore: remove console.log
  • Loading branch information
mlhiter authored Jan 20, 2025
1 parent af90775 commit b33e2ec
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ const JetBrainsGuideModal = ({
);
const data = await res.json();

setOnConnecting(true);

const controller = new AbortController();
controllerRef.current = controller;

Expand All @@ -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`;
Expand All @@ -112,6 +110,9 @@ const JetBrainsGuideModal = ({
if (progress) {
setProgress(progress);
}
if (progress && progress === 1) {
setOnConnecting(true);
}
},
signal: controller.signal
});
Expand All @@ -128,7 +129,7 @@ const JetBrainsGuideModal = ({
setProgress(0);
setOnConnecting(false);
}
}, [selectedIDE, jetbrainsGuideData.devboxName, connectIDE]);
}, [selectedIDE, jetbrainsGuideData.devboxName, connectIDE, jetbrainsGuideData.workingDir]);

return (
<Box>
Expand Down

0 comments on commit b33e2ec

Please sign in to comment.