diff options
-rw-r--r-- | osdep/macosx_application.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/osdep/macosx_application.m b/osdep/macosx_application.m index b42cba5c37..c5540494e4 100644 --- a/osdep/macosx_application.m +++ b/osdep/macosx_application.m @@ -261,6 +261,14 @@ static void setup_bundle(int *argc, char *argv[]) argv[1] = NULL; } + NSDictionary *env = [[NSProcessInfo processInfo] environment]; + NSString *path_bundle = [env objectForKey:@"PATH"]; + NSString *path_new = [NSString stringWithFormat:@"%@:%@:%@:%@", + path_bundle, + @"/usr/local/bin", + @"/usr/opt/bin", + @"/usr/opt/local/bin"]; + setenv("PATH", [path_new UTF8String], 1); setenv("MPVBUNDLE", "true", 1); } |