Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 3852a24

Browse files
committed
fixup! feat: replace coder sh implementation to shell out to ssh
1 parent 672ce07 commit 3852a24

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/cmd/ssh.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ func shell(cmd *cobra.Command, args []string) error {
4646
if err != nil {
4747
return err
4848
}
49+
if env.LatestStat.ContainerStatus != coder.EnvironmentOn {
50+
return clog.Error("environment not available",
51+
fmt.Sprintf("current status: \"%s\"", env.LatestStat.ContainerStatus),
52+
clog.BlankLine,
53+
clog.Tipf("use \"coder envs rebuild %s\" to rebuild this environment", env.Name),
54+
)
55+
}
4956
wp, err := client.WorkspaceProviderByID(ctx, env.ResourcePoolID)
5057
if err != nil {
5158
return err

0 commit comments

Comments
 (0)