mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34:07 -08:00
fix(core): Unload any existing version of a community node before upgrading it
This commit is contained in:
parent
a91abeeff5
commit
6fdb479775
|
@ -410,6 +410,12 @@ describe('CommunityPackagesService', () => {
|
|||
expect.any(Object),
|
||||
expect.any(Function),
|
||||
);
|
||||
expect(loadNodesAndCredentials.unloadPackage).toHaveBeenCalledWith(
|
||||
installedPackage.packageName,
|
||||
);
|
||||
expect(loadNodesAndCredentials.loadPackage).toHaveBeenCalledWith(
|
||||
installedPackage.packageName,
|
||||
);
|
||||
});
|
||||
|
||||
test('should throw when not licensed', async () => {
|
||||
|
|
|
@ -354,6 +354,7 @@ export class CommunityPackagesService {
|
|||
|
||||
let loader: PackageDirectoryLoader;
|
||||
try {
|
||||
await this.loadNodesAndCredentials.unloadPackage(packageName);
|
||||
loader = await this.loadNodesAndCredentials.loadPackage(packageName);
|
||||
} catch (error) {
|
||||
// Remove this package since loading it failed
|
||||
|
|
Loading…
Reference in a new issue