mirror of
https://github.com/containers/skopeo.git
synced 2025-09-25 12:16:17 +00:00
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.41.0 to 1.42.0. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/main/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.41.0...v1.42.0) --- updated-dependencies: - dependency-name: github.com/containers/storage dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
16 lines
353 B
Go
16 lines
353 B
Go
package graphdriver
|
|
|
|
import (
|
|
"fmt"
|
|
"syscall"
|
|
)
|
|
|
|
// chrootOrChdir() is either a chdir() to the specified path, or a chroot() to the
|
|
// specified path followed by chdir() to the new root directory
|
|
func chrootOrChdir(path string) error {
|
|
if err := syscall.Chdir(path); err != nil {
|
|
return fmt.Errorf("changing to %q: %w", path, err)
|
|
}
|
|
return nil
|
|
}
|