From 102d1328c01360dc8b35e89c6199cc73bb53918e Mon Sep 17 00:00:00 2001 From: TomSweeneyRedHat Date: Fri, 4 Oct 2019 17:46:50 -0400 Subject: Update build man page with latest Buildah changes Changes include: Containerfile by default, add --device flags to bud, allow buildah bud to be called without arguments, and a couple of small typo corrections. Signed-off-by: TomSweeneyRedHat --- cmd/podman/utils.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cmd/podman/utils.go') diff --git a/cmd/podman/utils.go b/cmd/podman/utils.go index c0ddaba4e..592d7a1d1 100644 --- a/cmd/podman/utils.go +++ b/cmd/podman/utils.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "os" "reflect" "runtime/debug" @@ -63,3 +64,12 @@ func aliasFlags(f *pflag.FlagSet, name string) pflag.NormalizedName { } return pflag.NormalizedName(name) } + +// Check if a file exists and is not a directory +func checkIfFileExists(name string) bool { + file, err := os.Stat(name) + if os.IsNotExist(err) { + return false + } + return !file.IsDir() +} -- cgit v1.2.3-54-g00ecf