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

feat: replace coder sh implementation to shell out to ssh #292

Merged
merged 5 commits into from
Mar 17, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! feat: replace coder sh implementation to shell out to ssh
  • Loading branch information
cmoog committed Mar 17, 2021
commit 3852a2416e1ada63a7580f11c9b075773b9a38ab
7 changes: 7 additions & 0 deletions internal/cmd/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ func shell(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
if env.LatestStat.ContainerStatus != coder.EnvironmentOn {
return clog.Error("environment not available",
fmt.Sprintf("current status: \"%s\"", env.LatestStat.ContainerStatus),
clog.BlankLine,
clog.Tipf("use \"coder envs rebuild %s\" to rebuild this environment", env.Name),
)
}
wp, err := client.WorkspaceProviderByID(ctx, env.ResourcePoolID)
if err != nil {
return err
Expand Down