mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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);
|
await license.init(this.instanceId);
|
||||||
|
|
||||||
const activationKey = config.getEnv('license.activationKey');
|
const activationKey = config.getEnv('license.activationKey');
|
||||||
|
|
||||||
if (activationKey) {
|
if (activationKey) {
|
||||||
|
const hasCert = (await license.loadCertStr()).length > 0;
|
||||||
|
|
||||||
|
if (hasCert) {
|
||||||
|
return LoggerProxy.debug('Skipping license activation');
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
LoggerProxy.debug('Attempting license activation');
|
||||||
await license.activate(activationKey);
|
await license.activate(activationKey);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
LoggerProxy.error('Could not activate license', e as Error);
|
LoggerProxy.error('Could not activate license', e as Error);
|
||||||
|
|||||||
Reference in New Issue
Block a user