diff --git a/packages/core/strapi/bin/strapi.js b/packages/core/strapi/bin/strapi.js index 63ceeee992..757aead554 100755 --- a/packages/core/strapi/bin/strapi.js +++ b/packages/core/strapi/bin/strapi.js @@ -258,22 +258,24 @@ program .option('-s, --silent', `Run the generation silently, without any output`, false) .action(getLocalScript('ts/generate-types')); -// `$ strapi transfer` -program - .command('transfer') - .description('Transfer data from one source to another') - .addOption(new Option('--from ', `URL of remote Strapi instance to get data from.`)) - .addOption(new Option('--to ', `URL of remote Strapi instance to send data to`)) - .hook('preAction', async (thisCommand) => { - const opts = thisCommand.opts(); +if (process.env.STRAPI_EXPERIMENTAL) { + // `$ strapi transfer` + program + .command('transfer') + .description('Transfer data from one source to another') + .addOption(new Option('--from ', `URL of remote Strapi instance to get data from.`)) + .addOption(new Option('--to ', `URL of remote Strapi instance to send data to`)) + .hook('preAction', async (thisCommand) => { + const opts = thisCommand.opts(); - if (!opts.from && !opts.to) { - console.error('At least one source (from) or destination (to) option must be provided'); - process.exit(1); - } - }) - .allowExcessArguments(false) - .action(getLocalScript('transfer/transfer')); + if (!opts.from && !opts.to) { + console.error('At least one source (from) or destination (to) option must be provided'); + process.exit(1); + } + }) + .allowExcessArguments(false) + .action(getLocalScript('transfer/transfer')); +} // `$ strapi export` program