mirror of
https://github.com/cheat/cheat.git
synced 2026-03-07 11:13:33 +01:00
chore(deps): bump github.com/go-git/go-git/v5 from 5.16.5 to 5.17.0
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.16.5 to 5.17.0. - [Release notes](https://github.com/go-git/go-git/releases) - [Commits](https://github.com/go-git/go-git/compare/v5.16.5...v5.17.0) --- updated-dependencies: - dependency-name: github.com/go-git/go-git/v5 dependency-version: 5.17.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
11
vendor/github.com/go-git/go-billy/v5/helper/polyfill/polyfill.go
generated
vendored
11
vendor/github.com/go-git/go-billy/v5/helper/polyfill/polyfill.go
generated
vendored
@@ -13,7 +13,7 @@ type Polyfill struct {
|
||||
c capabilities
|
||||
}
|
||||
|
||||
type capabilities struct{ tempfile, dir, symlink, chroot bool }
|
||||
type capabilities struct{ tempfile, dir, symlink, chroot, chmod bool }
|
||||
|
||||
// New creates a new filesystem wrapping up 'fs' the intercepts all the calls
|
||||
// made and errors if fs doesn't implement any of the billy interfaces.
|
||||
@@ -28,6 +28,7 @@ func New(fs billy.Basic) billy.Filesystem {
|
||||
_, h.c.dir = h.Basic.(billy.Dir)
|
||||
_, h.c.symlink = h.Basic.(billy.Symlink)
|
||||
_, h.c.chroot = h.Basic.(billy.Chroot)
|
||||
_, h.c.chmod = h.Basic.(billy.Chmod)
|
||||
return h
|
||||
}
|
||||
|
||||
@@ -87,6 +88,14 @@ func (h *Polyfill) Chroot(path string) (billy.Filesystem, error) {
|
||||
return h.Basic.(billy.Chroot).Chroot(path)
|
||||
}
|
||||
|
||||
func (h *Polyfill) Chmod(path string, mode os.FileMode) error {
|
||||
if !h.c.chmod {
|
||||
return billy.ErrNotSupported
|
||||
}
|
||||
|
||||
return h.Basic.(billy.Chmod).Chmod(path, mode)
|
||||
}
|
||||
|
||||
func (h *Polyfill) Root() string {
|
||||
if !h.c.chroot {
|
||||
return string(filepath.Separator)
|
||||
|
||||
8
vendor/github.com/go-git/go-billy/v5/osfs/os_bound.go
generated
vendored
8
vendor/github.com/go-git/go-billy/v5/osfs/os_bound.go
generated
vendored
@@ -126,6 +126,14 @@ func (fs *BoundOS) TempFile(dir, prefix string) (billy.File, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
_, err = os.Stat(dir)
|
||||
if err != nil && os.IsNotExist(err) {
|
||||
err = os.MkdirAll(dir, defaultDirectoryMode)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tempFile(dir, prefix)
|
||||
|
||||
Reference in New Issue
Block a user