Skip to content

Commit

Permalink
Merge pull request #23 from basecamp/dont-panic-if-unable-to-launch-p…
Browse files Browse the repository at this point in the history
…rocess

Failure to start wrapped process should not panic
  • Loading branch information
kevinmcconnell authored May 1, 2024
2 parents 550c8cd + 42ad86a commit 2cfbe2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package internal

import (
"fmt"
"log/slog"
"net/url"
"os"
)
Expand Down Expand Up @@ -37,7 +38,8 @@ func (s *Service) Run() int {

exitCode, err := upstream.Run()
if err != nil {
panic(err)
slog.Error("Failed to start wrapped process", "command", s.config.UpstreamCommand, "args", s.config.UpstreamArgs, "error", err)
return 1
}

return exitCode
Expand Down

0 comments on commit 2cfbe2c

Please sign in to comment.