mirror of
https://github.com/containers/podman.git
synced 2025-12-01 02:27:13 +08:00
bump buildah to latest
Also includes a small change to make us of https://github.com/containers/buildah/pull/5039 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
28
vendor/github.com/containers/buildah/internal/tmpdir/tmpdir.go
generated
vendored
Normal file
28
vendor/github.com/containers/buildah/internal/tmpdir/tmpdir.go
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
package tmpdir
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/containers/common/pkg/config"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// GetTempDir returns base for a temporary directory on host.
|
||||
func GetTempDir() string {
|
||||
if tmpdir, ok := os.LookupEnv("TMPDIR"); ok {
|
||||
abs, err := filepath.Abs(tmpdir)
|
||||
if err == nil {
|
||||
return abs
|
||||
}
|
||||
logrus.Warnf("ignoring TMPDIR from environment, evaluating it: %v", err)
|
||||
}
|
||||
containerConfig, err := config.Default()
|
||||
if err != nil {
|
||||
tmpdir, err := containerConfig.ImageCopyTmpDir()
|
||||
if err != nil {
|
||||
return tmpdir
|
||||
}
|
||||
}
|
||||
return "/var/tmp"
|
||||
}
|
||||
Reference in New Issue
Block a user