Skip to content

Commit

Permalink
fix: --background flag when pid file is missing (#1857)
Browse files Browse the repository at this point in the history
  • Loading branch information
worstell authored Jun 21, 2024
1 parent b725464 commit 97767a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/ftl/cmd_serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ func pidFilePath() (string, error) {

func getPIDFromPath(path string) (int, error) {
pidBytes, err := os.ReadFile(path)
if err != nil {
if os.IsNotExist(err) {
return 0, nil
} else if err != nil {
return 0, err
}
pid, err := strconv.Atoi(string(pidBytes))
Expand Down

0 comments on commit 97767a0

Please sign in to comment.