mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08:00
fix(core): Skip license activation when instance was already activated (#6064)
This commit is contained in:
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);
|
||||
|
|
Loading…
Reference in a new issue