From d0f9cd5ef05afcecdd76eec720bba9ec70792369 Mon Sep 17 00:00:00 2001 From: init Date: Fri, 19 Sep 2025 15:56:31 +0800 Subject: [PATCH] fix bug --- services/devcontainer/docker_agent.go | 2 +- templates/repo/devcontainer/details.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/devcontainer/docker_agent.go b/services/devcontainer/docker_agent.go index 295a80245f..1c0ed24d40 100644 --- a/services/devcontainer/docker_agent.go +++ b/services/devcontainer/docker_agent.go @@ -285,7 +285,7 @@ func CreateDevContainerByDockerCommand(ctx context.Context, newDevcontainer *dev Status: "waitting", UserId: newDevcontainer.UserId, RepoId: newDevcontainer.RepoId, - Command: `docker -H ` + dockerSocket + ` exec -it --workdir ` + newDevcontainer.DevcontainerWorkDir + ` ` + newDevcontainer.Name + ` sh -c "echo 'Successfully connected to the container';bash"` + "\n", + Command: `docker -H ` + dockerSocket + ` exec -it --workdir ` + newDevcontainer.DevcontainerWorkDir + "/" + repo.Name + ` ` + newDevcontainer.Name + ` sh -c "echo 'Successfully connected to the container';bash"` + "\n", ListId: 4, DevcontainerId: newDevcontainer.Id, }); err != nil { diff --git a/templates/repo/devcontainer/details.tmpl b/templates/repo/devcontainer/details.tmpl index 15951ddf42..c629093e4d 100644 --- a/templates/repo/devcontainer/details.tmpl +++ b/templates/repo/devcontainer/details.tmpl @@ -282,7 +282,7 @@ function getStatus() { if(status !== '9' && status !== '-1' && data.status == '9'){ window.location.reload(); } - if(status == '9' && data.status == '-1'){ + if(status !== '-1' && data.status == '-1'){ window.location.reload(); } status = data.status