Skip to content

Commit 9b4f923

Browse files
authored
Point the cli to the production gateway (#327)
## Summary Point the CLI to the production gateway (`gateway.devbox.sh`) by default. Note that this means that if you're working on the gateway, you'll need to re-compile the devbox binary to test against your development version. Let me know if you prefer I add an (internal) flag to select which gateway to talk to. ## How was it tested? Didn't.
1 parent f90513a commit 9b4f923

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cloud/cloud.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,15 @@ type authResponse struct {
7676
}
7777

7878
func getVirtualMachine(username string) string {
79+
// When developing we can use this env variable to point
80+
// to a different gateway
81+
hostname := os.Getenv("DEVBOX_GATEWAY")
82+
if hostname == "" {
83+
hostname = "gateway.devbox.sh"
84+
}
7985
client := sshclient.Client{
8086
Username: username,
81-
// TODO: change gateway to prod by default before relesing.
82-
Hostname: "gateway.dev.devbox.sh",
87+
Hostname: hostname,
8388
}
8489
bytes, err := client.Exec("auth")
8590
if err != nil {

0 commit comments

Comments
 (0)