fix: check for process.env.CONFIG_SYNC_CLI with 'true' instead of true

pull/128/head
Boaz Poolman 2024-04-18 23:09:12 +02:00
parent 6821110d7e
commit 769e2c3be3
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ module.exports = async () => {
if (strapi.config.get('plugin.config-sync.importOnBootstrap')) { if (strapi.config.get('plugin.config-sync.importOnBootstrap')) {
if (strapi.server.app.env === 'development') { if (strapi.server.app.env === 'development') {
strapi.log.warn(logMessage(`You can't use the 'importOnBootstrap' setting in the development env.`)); strapi.log.warn(logMessage(`You can't use the 'importOnBootstrap' setting in the development env.`));
} else if (process.env.CONFIG_SYNC_CLI === true) { } else if (process.env.CONFIG_SYNC_CLI === 'true') {
strapi.log.warn(logMessage(`The 'importOnBootstrap' setting was ignored because Strapi was started from the config-sync CLI itself.`)); strapi.log.warn(logMessage(`The 'importOnBootstrap' setting was ignored because Strapi was started from the config-sync CLI itself.`));
} else if (fs.existsSync(strapi.config.get('plugin.config-sync.syncDir'))) { } else if (fs.existsSync(strapi.config.get('plugin.config-sync.syncDir'))) {
await strapi.plugin('config-sync').service('main').importAllConfig(); await strapi.plugin('config-sync').service('main').importAllConfig();