0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

refactor(core): add IGNORE_CONNECTOR_VERSION_CHECK (#3028)

This commit is contained in:
Gao Sun 2023-01-30 16:31:00 +08:00 committed by GitHub
parent fb5d5ed297
commit d61105c131
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -85,6 +85,7 @@ const loadEnvValues = () => {
developmentTenantId,
trustProxyHeader: isTrue(getEnv('TRUST_PROXY_HEADER')),
adminConsoleUrl: appendPath(endpoint, '/console'),
ignoreConnectorVersionCheck: isTrue(getEnv('IGNORE_CONNECTOR_VERSION_CHECK')),
});
};

View file

@ -21,8 +21,8 @@ const checkConnectorKitVersion = (dependencies: unknown) => {
const message = `Connector requires ${connectorKit} to be ${value}, but the version here is ${currentVersion}.`;
if (EnvSet.values.isIntegrationTest) {
console.warn(`[warn] ${message}\n\nThis will result an error in production.`);
if (EnvSet.values.isIntegrationTest || EnvSet.values.ignoreConnectorVersionCheck) {
console.warn(`[warn] ${message}\n\nThis is highly discouraged in production.`);
return;
}