Skip to content

Commit 3a4bb37

Browse files
committed
chore: change config-ssh Call to Action to use suffix
1 parent 77364ba commit 3a4bb37

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", coderdConfig.HostnamePrefix, 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