summaryrefslogtreecommitdiff
path: root/cmd/podman/utils.go
diff options
context:
space:
mode:
authorTomSweeneyRedHat <tsweeney@redhat.com>2019-10-04 17:46:50 -0400
committerTomSweeneyRedHat <tsweeney@redhat.com>2019-10-10 18:04:30 -0400
commit102d1328c01360dc8b35e89c6199cc73bb53918e (patch)
treecb9664662c04bb2da7c7695a6417ba09cce9feda /cmd/podman/utils.go
parentfd389d28ce2223550c82d809cbafa12a54e733e6 (diff)
downloadpodman-102d1328c01360dc8b35e89c6199cc73bb53918e.tar.gz
podman-102d1328c01360dc8b35e89c6199cc73bb53918e.tar.bz2
podman-102d1328c01360dc8b35e89c6199cc73bb53918e.zip
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 <tsweeney@redhat.com>
Diffstat (limited to 'cmd/podman/utils.go')
-rw-r--r--cmd/podman/utils.go10
1 files changed, 10 insertions, 0 deletions
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()
+}