From 7dfef036c75c6f85d0a2fd56adb3f36decb90505 Mon Sep 17 00:00:00 2001 From: Michael Herold Date: Thu, 31 Mar 2022 10:10:55 -0500 Subject: [PATCH] Support podman in macOS With [a fix][1] in [podman v3.4.3][2], these commands now work as expected in macOS. Potentially, it might make sense to version check podman to ensure that the minimum version is met, but I'm not sure that's needed because it's unlikely that people have an older version installed _and_ wish to use this tool. I'm unsure whether the commands work on Windows so I left the unsupported version there compiling with the negation of the supported flags. [1]: https://github.com/containers/podman/issues/12402 [2]: https://github.com/containers/podman/blob/4ba71f955a944790edda6e007e6d074009d437a7/RELEASE_NOTES.md#bugfixes-2 --- dive/image/podman/build.go | 2 +- dive/image/podman/cli.go | 2 +- dive/image/podman/{resolver_linux.go => resolver.go} | 2 ++ .../podman/{resolver_notlinux.go => resolver_unsupported.go} | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) rename dive/image/podman/{resolver_linux.go => resolver.go} (97%) rename dive/image/podman/{resolver_notlinux.go => resolver_unsupported.go} (93%) diff --git a/dive/image/podman/build.go b/dive/image/podman/build.go index bfebc492..617f1468 100644 --- a/dive/image/podman/build.go +++ b/dive/image/podman/build.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux darwin package podman diff --git a/dive/image/podman/cli.go b/dive/image/podman/cli.go index 83523afc..b9090557 100644 --- a/dive/image/podman/cli.go +++ b/dive/image/podman/cli.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux darwin package podman diff --git a/dive/image/podman/resolver_linux.go b/dive/image/podman/resolver.go similarity index 97% rename from dive/image/podman/resolver_linux.go rename to dive/image/podman/resolver.go index 592c0383..a265d181 100644 --- a/dive/image/podman/resolver_linux.go +++ b/dive/image/podman/resolver.go @@ -1,3 +1,5 @@ +// +build linux darwin + package podman import ( diff --git a/dive/image/podman/resolver_notlinux.go b/dive/image/podman/resolver_unsupported.go similarity index 93% rename from dive/image/podman/resolver_notlinux.go rename to dive/image/podman/resolver_unsupported.go index 8dfdd227..c49c5224 100644 --- a/dive/image/podman/resolver_notlinux.go +++ b/dive/image/podman/resolver_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux +// +build !linux,!darwin package podman