From d851d0ebeba8c09c257500dd10e63c5d61ba3ba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20SZKIBA?= Date: Tue, 10 Sep 2024 09:16:16 +0200 Subject: [PATCH] fix: In addition to ErrWorktreeNotClean the ErrUnstagedChanges handled as well. --- cmd/lint.go | 2 +- releases/v0.1.22.md | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 releases/v0.1.22.md diff --git a/cmd/lint.go b/cmd/lint.go index a0c564f..f06b082 100644 --- a/cmd/lint.go +++ b/cmd/lint.go @@ -94,7 +94,7 @@ func updateWorkdir(ctx context.Context, dir string, cloneURL string) error { err = wtree.Pull(&git.PullOptions{Force: true}) if err != nil && !errors.Is(err, git.NoErrAlreadyUpToDate) { - if !errors.Is(err, git.ErrWorktreeNotClean) { + if !errors.Is(err, git.ErrWorktreeNotClean) && !errors.Is(err, git.ErrUnstagedChanges) { return err } diff --git a/releases/v0.1.22.md b/releases/v0.1.22.md new file mode 100644 index 0000000..be898f0 --- /dev/null +++ b/releases/v0.1.22.md @@ -0,0 +1,9 @@ +k6registry `v0.1.22` is here 🎉! + +This is an internal maintenance release. + +**Retry git pull on error** + +In the git working directory, the file permissions are changed to make the cache persistent in GitHub action mode. As a consequence, the git pull operation will fail (if permissions have actually been changed). + +To fix this, if the pull operation fails, the pull operation is repeated after a forced checkout operation.