Rename the middleware and repo plugin directories

This commit is contained in:
Greg Neagle
2025-05-15 15:09:43 -07:00
parent 119e277ec8
commit 4aedb6cff4
2 changed files with 2 additions and 2 deletions

View File

@@ -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)

View File

@@ -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) {