From 4aedb6cff424f9329eb1390238c4b5dc30febbbc Mon Sep 17 00:00:00 2001 From: Greg Neagle Date: Thu, 15 May 2025 15:09:43 -0700 Subject: [PATCH] Rename the middleware and repo plugin directories --- code/cli/munki/shared/munkirepo/RepoFactory.swift | 2 +- .../cli/munki/shared/network/middleware/MiddlewareFactory.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/cli/munki/shared/munkirepo/RepoFactory.swift b/code/cli/munki/shared/munkirepo/RepoFactory.swift index 3f556734..823160a2 100644 --- a/code/cli/munki/shared/munkirepo/RepoFactory.swift +++ b/code/cli/munki/shared/munkirepo/RepoFactory.swift @@ -55,7 +55,7 @@ private func loadRepoPlugin(at path: String) throws -> RepoPluginBuilder { /// Try to load a Repo plugin from our RepoPlugins directory func findRepoInPlugins(_ name: String, url: String) throws -> Repo? { let pluginName = name + ".plugin" - let repoPluginsDir = (Bundle.main.bundlePath as NSString).appendingPathComponent("RepoPlugins") + let repoPluginsDir = (Bundle.main.bundlePath as NSString).appendingPathComponent("repoplugins") let repoPluginNames = (try? FileManager.default.contentsOfDirectory(atPath: repoPluginsDir)) ?? [] if repoPluginNames.contains(pluginName) { let pluginPath = (repoPluginsDir as NSString).appendingPathComponent(pluginName) diff --git a/code/cli/munki/shared/network/middleware/MiddlewareFactory.swift b/code/cli/munki/shared/network/middleware/MiddlewareFactory.swift index d6845099..3c7d3e69 100644 --- a/code/cli/munki/shared/network/middleware/MiddlewareFactory.swift +++ b/code/cli/munki/shared/network/middleware/MiddlewareFactory.swift @@ -55,7 +55,7 @@ private func loadMiddlewarePlugin(at path: String) throws -> MiddlewarePluginBui /// Try to load a middleware plugin from our MiddlewarePlugins directory func loadMiddlewarePlugin() throws -> MunkiMiddleware? { let pluginExt = ".plugin" - let pluginsDir = (Bundle.main.bundlePath as NSString).appendingPathComponent("MiddlewarePlugins") + let pluginsDir = (Bundle.main.bundlePath as NSString).appendingPathComponent("middleware") let filenames = (try? FileManager.default.contentsOfDirectory(atPath: pluginsDir)) ?? [] for filename in filenames { if filename.hasSuffix(pluginExt) {