3

I have a .forceignore file with the following line.

**/objects/**/fields/*__*

As I understand it, this should ignore any field file that contains a double underscore.

However, when I run

❯ sfdx force:source:ignored:list --sourcepath=force-app/main/default | grep fields

The output does not list, for instance force-app/main/default/objects/account/SBQQ__somefield.xml

First question: am I just flat out wrong about what I expect? I understand / believe that ** equals any sub-folder. I'm trying to craft basically any path containing objects/ any sub folder with fields folder, and any files in that contain __

Second question, since this doesn't work, is there a known way to do this?

2
  • What version of sfdx are you running? What shell are you trying this in? When I add that line to my .forceignore, it does indeed list every custom field for every custom and standard object, as I'd expect.
    – sfdcfox
    Commented Jan 28, 2023 at 0:25
  • Well. Glad to know I’m not crazy in my expectations. Using Zsh, and just updated sfdx this morning.
    – Kevin P
    Commented Jan 28, 2023 at 6:44

1 Answer 1

1

Ok Peeps.

  1. When testing glob patterns for .forceignore, please ensure you are writing to the .forceignore file, not the .ci.forceignore file that your ci system copies into place.

  2. The ultimate goal I had was to ignore namespaced custom fields. Here's the glob pattern I settled on: **/objects/**/fields/*__*__*

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .