mirror of
https://github.com/munki/munki.git
synced 2026-01-26 08:59:17 -06:00
Rename the middleware and repo plugin directories
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user