Skip to content
Merged
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
10 changes: 8 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ import (
)

func main() {
var tenantID string
var tenantID, shellType string
var reset, help bool
flag.StringVar(&tenantID, "tenant", "", "Specify the tenant Id.")
flag.BoolVar(&reset, "reset", false, "Reset the presisted tenant settings.")
flag.BoolVar(&help, "help", false, "Show the help text.")
flag.StringVar(&shellType,"shelltype","","Force to request the specified shell type (bash|pwsh)")
flag.Parse()

if help {
Expand Down Expand Up @@ -101,7 +102,12 @@ func main() {
return
}

t, err := RequestTerminal(tenantID, uri, css.Properties.PreferredShellType)
if ((shellType != "pwsh") && (shellType != "bash")) {
shellType = css.Properties.PreferredShellType
}


t, err := RequestTerminal(tenantID, uri, shellType)
if err != nil || t.SocketURI == "" {
fmt.Println("Failed to connect to cloud shell terminal.", err)
return
Expand Down