mirror of
https://github.com/containers/skopeo.git
synced 2025-09-06 09:12:25 +00:00
Update containers/storage to v1.12.2
This commit simply bumps containers/storage to the latest version to unblock the containers/image integration test runs. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
This commit is contained in:
16
vendor/github.com/containers/storage/utils.go
generated
vendored
16
vendor/github.com/containers/storage/utils.go
generated
vendored
@@ -6,6 +6,7 @@ import (
|
||||
"os/exec"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
@@ -158,6 +159,21 @@ func getTomlStorage(storeOptions *StoreOptions) *tomlConfig {
|
||||
return config
|
||||
}
|
||||
|
||||
func getRootlessUID() int {
|
||||
uidEnv := os.Getenv("_CONTAINERS_ROOTLESS_UID")
|
||||
if uidEnv != "" {
|
||||
u, _ := strconv.Atoi(uidEnv)
|
||||
return u
|
||||
}
|
||||
return os.Geteuid()
|
||||
}
|
||||
|
||||
// DefaultStoreOptionsAutoDetectUID returns the default storage ops for containers
|
||||
func DefaultStoreOptionsAutoDetectUID() (StoreOptions, error) {
|
||||
uid := getRootlessUID()
|
||||
return DefaultStoreOptions(uid != 0, uid)
|
||||
}
|
||||
|
||||
// DefaultStoreOptions returns the default storage ops for containers
|
||||
func DefaultStoreOptions(rootless bool, rootlessUid int) (StoreOptions, error) {
|
||||
var (
|
||||
|
Reference in New Issue
Block a user