package util

import (
	"errors"
	"os"
	"os/exec"
)

func GitPull() error {
	workDir, err := os.Getwd()
	if err != nil {
		return err
	}
	cmd := exec.Command("git", "pull")
	cmd.Dir = workDir

	output, err := cmd.CombinedOutput()
	if err != nil {
		return errors.New(string(output) + err.Error())
	}
	return nil
}
