Merge pull request #14894 from strapi/deits/cli-check-for-strapi

[DEITS] import / export should require being in local Strapi folder
This commit is contained in:
Ben Irvin 2022-11-16 22:40:41 +01:00 committed by GitHub
commit c6535a15dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,7 +303,7 @@ program
.arguments('[filename]') .arguments('[filename]')
.allowExcessArguments(false) .allowExcessArguments(false)
.hook('preAction', promptEncryptionKey) .hook('preAction', promptEncryptionKey)
.action(require('../lib/commands/transfer/export')); .action(getLocalScript('transfer/export'));
// `$ strapi import` // `$ strapi import`
program program
@ -329,6 +329,6 @@ program
) )
.arguments('<filename>') .arguments('<filename>')
.allowExcessArguments(false) .allowExcessArguments(false)
.action(require('../lib/commands/transfer/import')); .action(getLocalScript('transfer/import'));
program.parseAsync(process.argv); program.parseAsync(process.argv);