Skip to content

Commit b347e07

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

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cli/configssh.go

+5-1
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)