mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): Skip license activation when instance was already activated (#6064)
This commit is contained in:
committed by
GitHub
parent
1eeadc6114
commit
eaf7090919
@@ -189,8 +189,16 @@ export class Start extends BaseCommand {
|
||||
await license.init(this.instanceId);
|
||||
|
||||
const activationKey = config.getEnv('license.activationKey');
|
||||
|
||||
if (activationKey) {
|
||||
const hasCert = (await license.loadCertStr()).length > 0;
|
||||
|
||||
if (hasCert) {
|
||||
return LoggerProxy.debug('Skipping license activation');
|
||||
}
|
||||
|
||||
try {
|
||||
LoggerProxy.debug('Attempting license activation');
|
||||
await license.activate(activationKey);
|
||||
} catch (e) {
|
||||
LoggerProxy.error('Could not activate license', e as Error);
|
||||
|
||||
Reference in New Issue
Block a user