mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -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);
|
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);
|
||||||
|
|
Loading…
Reference in a new issue