question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.forceignore Does Not Work as Documented

See original GitHub issue

Summary

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:

  1. install an app with a namespace in your developer org such as smart vCard
  2. Add lines to .forceignore pattern of the managed package’s namespace smartvCard__*
  3. Refresh the metadata for the contact object
  4. 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:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
JNiedlecommented, Feb 22, 2021

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.

0reactions
no-response[bot]commented, Oct 25, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

forceignore process is broken in Winter 2021
forceignore is broken with Winter 2021. I can neither deploy to nor retrieve from the org I am connected to by right-clicking on...
Read more >
Fix the following lines in your .forceignore and add ...
As the warning says, your .forceignore file is not adhering to the .gitignore format. The recent release of CLI recommends (for now it's...
Read more >
Why can't I find specific metadata in my Gearset comparison ...
It's fairly common that customers contact us because they're unable to locate a specific metadata item in their Gearset comparison results. This can...
Read more >
CLI .forceignore File
When working with the CLI, you can use a .forceignore file to exclude specific elements when pushing your changes.
Read more >
How Continuous Integration can help you to make a ... - LinkedIn
This works very well but with this method you don't have a source ... site to the Documentation for Included Extensions section you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found