We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c0d67b commit b9e5854Copy full SHA for b9e5854
pkg/util/util.go
@@ -56,6 +56,10 @@ func queryPackageVersion(cmdArg ...string) string {
56
// Note: This function is copied from containers/podman libpod/util.go
57
// Please see https://github.com/containers/common/pull/1460
58
func PackageVersion(program string) string { // program is full path
59
+ _, err := os.Stat(program)
60
+ if err != nil {
61
+ return UnknownPackage
62
+ }
63
packagers := [][]string{
64
{"/usr/bin/rpm", "-q", "-f"},
65
{"/usr/bin/dlocate", "-F"}, // Debian, Ubuntu (quick)
0 commit comments