.forceignore Does Not Work as Documented
See original GitHub issueSummary
When running sfdx force:source:retrieve --manifest path/to/package.xml
or sfdx force:source:retrieve --sourcepath path/to/object/contact
, the .forceignore file is not being respected for managed packages.
Steps To Reproduce:
- install an app with a namespace in your developer org such as smart vCard
- Add lines to .forceignore pattern of the managed package’s namespace
smartvCard__*
- Refresh the metadata for the contact object
- fields that start with the value smartvCard__ are still retrieved into the package
Expected result
Per the .forceignore docs, files matching the patterns in the .forceignore file should be excluded.
Actual result
Files matching the patterns in the .forceignore are still retrieved into the project
Additional information
SFDX CLI Version(to find the version of the CLI engine run sfdx --version): sfdx-cli/7.85.1-2fb9e41053 win32-x64 node-v12.18.3
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core): @oclif/plugin-autocomplete 0.1.5 (core) @oclif/plugin-commands 1.3.0 (core) @oclif/plugin-help 3.2.1 (core) @oclif/plugin-not-found 1.2.4 (core) @oclif/plugin-plugins 1.9.5 (core) @oclif/plugin-update 1.3.10 (core) @oclif/plugin-warn-if-update-available 1.7.0 (core) @oclif/plugin-which 1.0.3 (core) @salesforce/sfdx-trust 3.6.0 (core) alias 1.1.5 (core) analytics 1.12.1 (core) auth 1.4.6 (core) config 1.2.3 (core) generator 1.1.3 (core) salesforcedx 50.15.0 (core) ├─ schema 1.0.3 (core) ├─ limits 1.0.3 (core) ├─ user 1.0.9 (core) ├─ custom-metadata 1.0.11 (core) ├─ apex 0.1.4 (core) ├─ templates 50.4.0 (core) ├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core) └─ salesforce-alm 50.15.0 (core) sfdx-cli 7.85.1 (core)
OS and version: Win10 20H2
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Hi @mshanemc. I was using the
# .forceignore v2
and had the same result. I confirmed that the<packagenamespace>__*
pattern worked for gitignore by adding the same pattern to my gitignore where those files were successfully ignored by git.This issue has been automatically closed because there has been no response to our request for more information from the original author. Currently, there is not enough information provided for us to take action. Please reply and reopen this issue if you need additional assistance.