From 1550934e70cf2998dc56a4cf2cf29cebd52ba794 Mon Sep 17 00:00:00 2001 From: "farsen.abdallah-combo" Date: Mon, 28 Oct 2024 10:38:46 +0100 Subject: [PATCH] chore: improve logs error on release manager plugin load --- __tests__/core/pluginManager/ReleasePluginManager.test.ts | 2 +- src/core/pluginManager/ReleasePluginManager.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/core/pluginManager/ReleasePluginManager.test.ts b/__tests__/core/pluginManager/ReleasePluginManager.test.ts index 94fc54f..c6ea7ac 100644 --- a/__tests__/core/pluginManager/ReleasePluginManager.test.ts +++ b/__tests__/core/pluginManager/ReleasePluginManager.test.ts @@ -24,7 +24,7 @@ describe('pluginManager', () => { '@root/plugins/release/defaultReleaseManager' ) ).rejects.toThrow( - 'Cannot load release manager plugin. Invalid path or plugin already loaded.' + 'Cannot load release manager plugin. Invalid path or plugin already loaded. Plugin: defaultReleaseManager' ); }); it('should return release manager by name', async () => { diff --git a/src/core/pluginManager/ReleasePluginManager.ts b/src/core/pluginManager/ReleasePluginManager.ts index 19b4681..e2a4591 100644 --- a/src/core/pluginManager/ReleasePluginManager.ts +++ b/src/core/pluginManager/ReleasePluginManager.ts @@ -37,7 +37,7 @@ export default class ReleasePluginManager { 'Cannot load release manager plugin. Invalid path or plugin already loaded.'; const releaseManagerName = path.split('/').pop()!; if (this.instance.releaseManagers.has(releaseManagerName)) { - throw new Error(errMessage); + throw new Error(`${errMessage} Plugin: ${releaseManagerName}`); } try { // import default export from the given path