I'd like to have an option on the force:source:retrieve command that allows me to include/excludes Managed Pakage's components automatically. For example, in case I installed a Managed Package that adds some fields on the Account object, when running this command
sfdx force:source:retrieve -m CustomObject:Account
I'll also retrieve all the fields created by the Managed Package.
Describe the solution you'd like
An option that could look like this:
sfdx force:source:retrieve -m CustomObject:Account --exclude-managed-components
In this case all the fields that are part of a Managed Package won't be retrieved.
@maaaaarco do you want this to work as a blanket exclusion of all managed package components or can you forsee ever wanting to pick and choose components to exclude?
Mmmmm no at the moment I cannot forsee any reason why I might want to retrieve only some Managed components. In that case I might configure which components to exclude and which to include inside my .forceignore file.
the inverse of this might also be considered, currently if you retrieve all custom objects, i'd expect get unmanaged fields on managed objects, but i get nothing
seems like the default behavior should be
right now you get managed metadata you don't want, and you don't get unmanaged metadata you would, makes CI difficult due to errors about not being able to modify managed metadata, or having to manually specify unmanaged metadata
Most helpful comment
the inverse of this might also be considered, currently if you retrieve all custom objects, i'd expect get unmanaged fields on managed objects, but i get nothing
seems like the default behavior should be
right now you get managed metadata you don't want, and you don't get unmanaged metadata you would, makes CI difficult due to errors about not being able to modify managed metadata, or having to manually specify unmanaged metadata