mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
fix(deps): update module github.com/vbatts/git-validation to v1.2.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
13
test/tools/vendor/github.com/vbatts/git-validation/validate/runner.go
generated
vendored
13
test/tools/vendor/github.com/vbatts/git-validation/validate/runner.go
generated
vendored
@ -5,6 +5,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/vbatts/git-validation/git"
|
||||
)
|
||||
|
||||
@ -29,7 +30,11 @@ func NewRunner(root string, rules []Rule, commitrange string, verbose bool) (*Ru
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer os.Chdir(cwd)
|
||||
defer func() {
|
||||
if err := os.Chdir(cwd); err != nil {
|
||||
logrus.Warnf("changing working directory to %q failed: %s", cwd, err)
|
||||
}
|
||||
}()
|
||||
|
||||
if err := os.Chdir(newroot); err != nil {
|
||||
return nil, err
|
||||
@ -56,7 +61,11 @@ func (r *Runner) Run() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer os.Chdir(cwd)
|
||||
defer func() {
|
||||
if err := os.Chdir(cwd); err != nil {
|
||||
logrus.Warnf("changing working directory to %q failed: %s", cwd, err)
|
||||
}
|
||||
}()
|
||||
|
||||
if err := os.Chdir(r.Root); err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user