2 Commits
v2.5 ... v2.6

Author SHA1 Message Date
d976100cfb fix: correctly log unrecoverable serve errors
All checks were successful
Go Project Action / Spell-check and test go project (push) Successful in 52s
Release Go Application / Release go project (release) Successful in 46s
2025-10-31 22:38:25 +01:00
f5e41edd44 mod: redirect stderr of executed command for serve to log file
Some checks failed
Go Project Action / Spell-check and test go project (push) Failing after 54s
Release Go Application / Release go project (release) Successful in 51s
2025-10-31 22:35:02 +01:00

View File

@@ -56,6 +56,11 @@ func setupSshServer(host string, port string, host_key_path string, users map[st
func(next ssh.Handler) ssh.Handler {
return func(s ssh.Session) {
cmd := wish.Command(s, name, args...)
file, err := os.OpenFile("log", os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600)
if err != nil {
wish.Fatalln(s, err)
}
cmd.SetStderr(file)
if err := cmd.Run(); err != nil {
wish.Fatalln(s, err)
}