Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
walnuts1018 committed Apr 15, 2024
1 parent 563dc11 commit 4ec1a35
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/controller/codeserver_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,11 @@ func (r *CodeServerReconciler) reconcileDeployment(ctx context.Context, codeServ
)
}

command := fmt.Sprintf("%s && /usr/bin/entrypoint.sh --bind-addr 0.0.0.0:%d", codeServer.Spec.InitCommand, codeServer.Spec.ContainerPort)
command := fmt.Sprintf("/usr/bin/entrypoint.sh --bind-addr 0.0.0.0:%d", codeServer.Spec.ContainerPort)
if codeServer.Spec.InitCommand != "" {
command = fmt.Sprintf("%s && %s", codeServer.Spec.InitCommand, command)
}

if _, ok := codeServer.Spec.InitPlugins["git"]; ok {
command = fmt.Sprintf("%s /home/coder/work", command)
}
Expand Down

0 comments on commit 4ec1a35

Please sign in to comment.