mirror of
https://github.com/containers/skopeo.git
synced 2025-09-27 05:03:41 +00:00
Bump github.com/containers/image/v5 from 5.3.1 to 5.4.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.3.1 to 5.4.0. - [Release notes](https://github.com/containers/image/releases) - [Commits](https://github.com/containers/image/compare/v5.3.1...v5.4.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
committed by
Miloslav Trmač
parent
bd20786c38
commit
325327dc3f
22
vendor/github.com/containers/storage/pkg/unshare/unshare.go
generated
vendored
Normal file
22
vendor/github.com/containers/storage/pkg/unshare/unshare.go
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
package unshare
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/user"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// HomeDir returns the home directory for the current user.
|
||||
func HomeDir() (string, error) {
|
||||
home := os.Getenv("HOME")
|
||||
if home == "" {
|
||||
usr, err := user.LookupId(fmt.Sprintf("%d", GetRootlessUID()))
|
||||
if err != nil {
|
||||
return "", errors.Wrapf(err, "unable to resolve HOME directory")
|
||||
}
|
||||
home = usr.HomeDir
|
||||
}
|
||||
return home, nil
|
||||
}
|
Reference in New Issue
Block a user