Skip to content

Commit

Permalink
fix 🐛: revert c74a33a
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Hang <[email protected]>
  • Loading branch information
Banh-Canh committed Jan 3, 2025
1 parent 3ad41ba commit 416828c
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions internal/utils/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"os"
"os/exec"
"syscall"

"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
Expand Down Expand Up @@ -72,15 +71,7 @@ func RunCommand(dirName, command string, args ...string) error {
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Dir = dirName
// Ensure the command runs independently of the parent process
cmd.SysProcAttr = &syscall.SysProcAttr{
Setpgid: true, // Start the command in a new process group
}
// Start the command
if err := cmd.Start(); err != nil {
return err
}
return cmd.Wait()
return cmd.Run()
}

func GetLatestRemoteCommit(r *git.Repository, branch string) (string, error) {
Expand Down

0 comments on commit 416828c

Please sign in to comment.