Skip to content

Commit 9fe3fd4

Browse files
authored
chore: change config-ssh Call to Action to use suffix (#17445)
fixes #16828 With all the recent changes, I believe it is now safe to change the Call to Action for `config-ssh` to use the hostname suffix rather than prefix if it was set.
1 parent b0854aa commit 9fe3fd4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cli/configssh.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,11 @@ func (r *RootCmd) configSSH() *serpent.Command {
457457

458458
if len(res.Workspaces) > 0 {
459459
_, _ = fmt.Fprintln(out, "You should now be able to ssh into your workspace.")
460-
_, _ = fmt.Fprintf(out, "For example, try running:\n\n\t$ ssh %s%s\n", coderdConfig.HostnamePrefix, res.Workspaces[0].Name)
460+
if configOptions.hostnameSuffix != "" {
461+
_, _ = fmt.Fprintf(out, "For example, try running:\n\n\t$ ssh %s.%s\n", res.Workspaces[0].Name, configOptions.hostnameSuffix)
462+
} else if configOptions.userHostPrefix != "" {
463+
_, _ = fmt.Fprintf(out, "For example, try running:\n\n\t$ ssh %s%s\n", configOptions.userHostPrefix, res.Workspaces[0].Name)
464+
}
461465
} else {
462466
_, _ = fmt.Fprint(out, "You don't have any workspaces yet, try creating one with:\n\n\t$ coder create <workspace>\n")
463467
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy