Skip to content

Commit

Permalink
fix(server): wait for and ensure git command exits
Browse files Browse the repository at this point in the history
We have to wait for exec.Command to exit

Fixes: #262
  • Loading branch information
aymanbagabas committed May 5, 2023
1 parent 4533243 commit c93630e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ func RunGit(ctx context.Context, in io.Reader, out io.Writer, er io.Writer, dir
})

if err := errg.Wait(); err != nil {
logger.Error("while running git command", "err", err)
return err
logger.Error("while copying output", "err", err)
}

return nil
// Wait for the command to finish
return c.Wait()
}

// WritePktline encodes and writes a pktline to the given writer.
Expand Down

0 comments on commit c93630e

Please sign in to comment.