Skip to content

Commit

Permalink
fix: close #32
Browse files Browse the repository at this point in the history
  • Loading branch information
ilharp committed May 31, 2022
1 parent 6803774 commit a6774fb
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions packages/koi/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ func Daemon() error {

resolvedDir, err := util.Resolve(config.Config.InternalInstanceDir, config.Config.Target)
if err != nil {
l.Fatalf("Failed to resolve target: %s", config.Config.Target)
l.Errorf("Failed to resolve target: %s", config.Config.Target)
l.Error(err)
return err
}

yarnPath, err := ResolveYarn()
if err != nil {
l.Fatal(err)
l.Error(err)
return err
}

cmd, err := CreateNodeCmd(
Expand All @@ -44,7 +47,8 @@ func Daemon() error {
)
if err != nil {
l.Error("Err constructing NodeCmd:")
l.Fatal(err)
l.Error(err)
return err
}

if config.Config.Open {
Expand Down Expand Up @@ -76,6 +80,7 @@ func Daemon() error {
if err != nil {
l.Error("Cannot start Koishi process.")
l.Error(err)
return err
}

l.Debug("Koishi process started.")
Expand All @@ -89,8 +94,10 @@ func Daemon() error {
if err != nil {
l.Error("Koishi exited with:")
l.Error(err)
return err
}
return err

return nil
}

func daemonHandleExit(process *NodeCmd) {
Expand Down

0 comments on commit a6774fb

Please sign in to comment.