diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-17 12:05:52 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-17 12:05:52 +0800 |
commit | 5c80236c0ed27af9db42b6d5b60f0d365457c7a4 (patch) | |
tree | 4e2dfa054eb0e04aeba99130af18b3c5e85ac104 /ssh_server.go | |
parent | misc.go: Remove environ_to_map as unused (diff) | |
download | forge-5c80236c0ed27af9db42b6d5b60f0d365457c7a4.tar.gz forge-5c80236c0ed27af9db42b6d5b60f0d365457c7a4.tar.zst forge-5c80236c0ed27af9db42b6d5b60f0d365457c7a4.zip |
{remote_url,ssh_server}.go: Use path.Join instead of trimming and adding
Diffstat (limited to 'ssh_server.go')
-rw-r--r-- | ssh_server.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ssh_server.go b/ssh_server.go index 206bf72..63ba467 100644 --- a/ssh_server.go +++ b/ssh_server.go @@ -4,6 +4,7 @@ import ( "fmt" "net" "os" + "path" "strings" glider_ssh "github.com/gliderlabs/ssh" @@ -41,7 +42,7 @@ func serve_ssh(listener net.Listener) error { } clog.Info("Incoming SSH: " + session.RemoteAddr().String() + " " + client_public_key_string + " " + session.RawCommand()) - fmt.Fprintln(session.Stderr(), "Lindenii Forge "+VERSION+", source at "+strings.TrimSuffix(config.HTTP.Root, "/")+"/:/source/\r") + fmt.Fprintln(session.Stderr(), "Lindenii Forge "+VERSION+", source at "+path.Join(config.HTTP.Root, "/:/source/\r")) cmd := session.Command() |