Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions pkg/cmd/open/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ func NewCmdOpen(t *terminal.Terminal, store OpenStore, noLoginStartStore OpenSto

// Fetch workspace info, then open code editor
func runOpenCommand(t *terminal.Terminal, tstore OpenStore, wsIDOrName string, setupDoneString string, directory string, host bool) error { //nolint:funlen // define brev command

if !host {
t.Vprintf(t.Yellow("\nIf you need to ssh into the host machine, use the --host flag\n\n"))
}
// todo check if workspace is stopped and start if it if it is stopped
fmt.Println("finding your instance...")
res := refresh.RunRefreshAsync(tstore)
Expand Down Expand Up @@ -117,6 +121,8 @@ func runOpenCommand(t *terminal.Terminal, tstore OpenStore, wsIDOrName string, s
localIdentifier := workspace.GetLocalIdentifier()
if host {
localIdentifier = workspace.GetHostIdentifier()
} else {
t.Vprintf(t.Yellow("If you need to ssh into the host machine, use the --host flag\n\n"))
}

err = res.Await()
Expand Down
5 changes: 5 additions & 0 deletions pkg/cmd/shell/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ func NewCmdShell(t *terminal.Terminal, store ShellStore, noLoginStartStore Shell
}

func runShellCommand(t *terminal.Terminal, sstore ShellStore, workspaceNameOrID, directory string, host bool) error {

if !host {
t.Vprintf(t.Yellow("\nIf you need to ssh into the host machine, use the --host flag\n\n"))
}

s := t.NewSpinner()
workspace, err := util.GetUserWorkspaceByNameOrIDErr(sstore, workspaceNameOrID)
if err != nil {
Expand Down
Loading