Merge pull request #15483 from strapi/deits/fix-only-schemas

This commit is contained in:
Ben Irvin 2023-01-18 10:57:38 +01:00 committed by GitHub
commit 89235fd7fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -273,6 +273,11 @@ class TransferEngine<
shouldSkipStage(stage: TransferStage) {
const { exclude, only } = this.options;
// schemas must always be included
if (stage === 'schemas') {
return false;
}
// everything is included by default unless 'only' has been set
let included = isEmpty(only);
if (only?.length > 0) {

View File

@ -99,7 +99,7 @@ const excludeOption = new Option(
const onlyOption = new Option(
'--only <command-separated data types>',
`Include only this data. Available types: ${transferDataTypes.join(',')}`
`Include only this data (plus schemas). Available types: ${transferDataTypes.join(',')}`
).argParser(getParseListWithChoices(transferDataTypes, 'Invalid options for "only"'));
const validateExcludeOnly = (command) => {