fix: plugins were loaded twice on Windows
Massimo Melina committed
Mar 27, 2023 at 00:25 UTC
2317564878911325b3122367089594e02911a87b
1 file changed
+4
-1
src/plugins.ts
+4
-1
@@ -209,7 +209,10 @@ export async function rescan() {
209
const found = []
210
const foundDisabled: typeof availablePlugins = {}
211
const MASK = PATH + '/*/plugin.js' // be sure to not use path.join as fast-glob doesn't work with \
212
- for (const f of await glob([adjustStaticPathForGlob(APP_PATH) + '/' + MASK, MASK])) {
212
+ const pluginSources = [MASK]
213
+ if (APP_PATH !== process.cwd())
214
+ pluginSources.push(adjustStaticPathForGlob(APP_PATH) + '/' + MASK)
215
+ for (const f of await glob(pluginSources)) {
216
const id = f.split('/').slice(-2)[0]!
217
if (id.endsWith(DISABLING_POSTFIX)) continue
218
if (!enablePlugins.get().includes(id)) {