Fix
continuous-integration/drone/push Build is passing Details

This commit is contained in:
SeraphJACK 2023-09-26 19:39:25 +08:00
parent 7bdfff49ea
commit 0fd5598f6c
Signed by: SeraphJACK
GPG Key ID: B4FFEA56F3BE0D0C
2 changed files with 9 additions and 2 deletions

3
.gitignore vendored
View File

@ -21,3 +21,6 @@
# Go workspace file
go.work
.idea
beancount/
config.yml

View File

@ -43,11 +43,15 @@ func clone() error {
func pull() error {
w, err := repo.Worktree()
if err != nil && !errors.Is(err, git.NoErrAlreadyUpToDate) {
if err != nil {
return err
}
return w.Pull(&git.PullOptions{Auth: &http.BasicAuth{
err = w.Pull(&git.PullOptions{Auth: &http.BasicAuth{
Username: config.Cfg.Username,
Password: config.Cfg.Password,
}})
if err != nil && !errors.Is(err, git.NoErrAlreadyUpToDate) {
return err
}
return nil
}