diff --git a/package.json b/package.json index 68d3353..659c9a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-config-sync", - "version": "1.2.3", + "version": "1.2.5", "description": "Migrate your config data across environments using the CLI or Strapi admin panel.", "strapi": { "displayName": "Config Sync", diff --git a/server/bootstrap.js b/server/bootstrap.js index 3b2a612..54063b6 100644 --- a/server/bootstrap.js +++ b/server/bootstrap.js @@ -50,6 +50,8 @@ module.exports = async () => { if (strapi.config.get('plugin::config-sync.importOnBootstrap')) { if (strapi.server.app.env === 'development') { strapi.log.warn(logMessage(`You can't use the 'importOnBootstrap' setting in the development env.`)); + } 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.`)); } else if (fs.existsSync(strapi.config.get('plugin::config-sync.syncDir'))) { await strapi.plugin('config-sync').service('main').importAllConfig(); } diff --git a/server/cli.js b/server/cli.js index 7e7d751..90e182e 100644 --- a/server/cli.js +++ b/server/cli.js @@ -15,6 +15,8 @@ const packageJSON = require('../package.json'); const program = new Command(); const getStrapiApp = async () => { + process.env.CONFIG_SYNC_CLI = true; + try { const tsUtils = require('@strapi/typescript-utils'); // eslint-disable-line