isRemoteSession returns true if the CLI is running inside an SSH session where a local browser callback would not be reachable.
()
| 189 | // isRemoteSession returns true if the CLI is running inside an SSH session |
| 190 | // where a local browser callback would not be reachable. |
| 191 | func isRemoteSession() bool { |
| 192 | for _, key := range []string{"SSH_CLIENT", "SSH_TTY", "SSH_CONNECTION"} { |
| 193 | if os.Getenv(key) != "" { |
| 194 | return true |
| 195 | } |
| 196 | } |
| 197 | return false |
| 198 | } |
| 199 | |
| 200 | // Retrieve loginURL from the control plane |
| 201 | func retrieveLoginURL() (string, error) { |