Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save slp/7d05d5b47e9f59baad5f410f086ab4ba to your computer and use it in GitHub Desktop.
Save slp/7d05d5b47e9f59baad5f410f086ab4ba to your computer and use it in GitHub Desktop.
From 3396c40dc7cf133896e9c8a9bcf0f0bc09e6ad4d Mon Sep 17 00:00:00 2001
From: Sergio Lopez <slp@redhat.com>
Date: Thu, 9 Jun 2022 12:06:13 +0200
Subject: [PATCH 3/4] run_unix: don't return an error from getNetworkInterface
While networking is not supported on non-Linux systems, many
operations can still succeed if we allow buildah to proceed without a
NetworkInterface object.
To do so, don't return an error from getNetworkInterface.
Signed-off-by: Sergio Lopez <slp@redhat.com>
(cherry picked from commit 2d4d28248164f9f8d9be918e94ab03b51a3076cd)
Signed-off-by: Sergio Lopez <slp@redhat.com>
---
run_unix.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/run_unix.go b/run_unix.go
index 17870728..280176db 100644
--- a/run_unix.go
+++ b/run_unix.go
@@ -37,5 +37,5 @@ func DefaultNamespaceOptions() (NamespaceOptions, error) {
// getNetworkInterface creates the network interface
func getNetworkInterface(store storage.Store, cniConfDir, cniPluginPath string) (nettypes.ContainerNetwork, error) {
- return nil, errors.New("function not supported on non-linux systems")
+ return nil, nil
}
--
2.35.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment