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

This commit is contained in:
2025-10-31 22:38:25 +01:00
parent f5e41edd44
commit d976100cfb

View File

@@ -58,7 +58,7 @@ func setupSshServer(host string, port string, host_key_path string, users map[st
cmd := wish.Command(s, name, args...) cmd := wish.Command(s, name, args...)
file, err := os.OpenFile("log", os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600) file, err := os.OpenFile("log", os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600)
if err != nil { if err != nil {
wish.Fatalf(s, "Could not create or open log file. err: %w", err) wish.Fatalln(s, err)
} }
cmd.SetStderr(file) cmd.SetStderr(file)
if err := cmd.Run(); err != nil { if err := cmd.Run(); err != nil {