fix pull res

This commit is contained in:
pikastech 2022-09-22 00:38:30 +08:00
parent 5dcb727e1a
commit 4e14ba289c

View File

@ -282,10 +282,7 @@ func updatePikascript(path string) *git.Repository {
repo, _ := git.PlainOpen(path)
w, _ := repo.Worktree()
fmt.Println("Updating pikascript...")
err = w.Pull(&git.PullOptions{RemoteName: "origin"})
if err != nil {
println("Error repository is broken.")
}
w.Pull(&git.PullOptions{RemoteName: "origin"})
ref, _ := repo.Head()
commit, _ := repo.CommitObject(ref.Hash())
fmt.Println(commit)