Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Add MacPorts path #13

Open
jrjsmrtn opened this issue Jan 21, 2022 · 1 comment
Open

Add MacPorts path #13

jrjsmrtn opened this issue Jan 21, 2022 · 1 comment

Comments

@jrjsmrtn
Copy link

podman-macos cannot detect MacPorts' podman, as it's installed in /opt/local/bin.

This patch adds the MacPorts bin path:

diff --git a/Podman/Interop/PMManager.m b/Podman/Interop/PMManager.m
index 97ebd5a..b9f3964 100644
--- a/Podman/Interop/PMManager.m
+++ b/Podman/Interop/PMManager.m
@@ -106,13 +106,16 @@
         }
     }

-    // Test for homebrew default paths as a last resort...
-    NSArray *homebrewDefaultPaths = @[
+    // Test for MacPorts/Homebrew default paths as a last resort...
+    NSArray *packageManagersDefaultPaths = @[
+        // MacPorts
+        @"/opt/local/bin",
+        // Homebrew
         @"/usr/local/bin",
         @"/opt/homebrew/bin",
     ];

-    for (NSString *base in homebrewDefaultPaths) {
+    for (NSString *base in packageManagersDefaultPaths) {
         NSString *target = [base stringByAppendingPathComponent:appName];
         if ([[NSFileManager defaultManager] isExecutableFileAtPath:target]) {
             return target;
@lhoekenga
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants