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 **.md bug

See original GitHub issue

Summary

Following this guide on excluding files when syncing or pushing to a scratch org I implemented **.md in my .forceignore. Vivek also includes this notation in his template repo’s forceignore.

There is an issue with the way sfdx is handling **.md in the forceignore and custom metadata when pushing to the org. If you have a customMetadata file named MyCustomMetadata.md-meta.xml, this will be ignored.

Steps To Reproduce:

  1. Step 1. Have a custom metadata file in your source directory named something like MyCustomMetadata.md-meta.xml
  2. Step 2. Have **.md in the forceignore file
  3. Step 3. Deploy to your scratch org, noting that your custom metadata isn’t deployed.
  4. Step 4. Remove **.md in the forceignore file and redeploy to your scratch org. Take note that it deploys the custom metadata.

Expected result

Only .md extensions should be ignored, not .md-meta.xml, when adding **.md to the .forceignore file.

I could understand this behavior if I had added **.md* to the .forceignore file.

Actual result

.md-meta.xml files are not deployed with **.md in the .forceignore file.

Additional information

sfdx-cli/6.56.0 (darwin-x64) node-v8.15.1

@salesforce/plugin-generator 1.0.1 (core) @salesforce/sfdx-trust 2.1.0 (core) builtins 1.0.0 (core) salesforcedx 45.5.0 (core)

Mac OS Mojave 10.14.3 (18D42)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nramyasri-sfcommented, Apr 17, 2019

@Kevmo92 , @cnaccio , this looks like a generic issue and not just related to metadata files. I am working on it and will update as soon as I am able to fix it. Thanks!

1reaction
clairebianchicommented, Mar 26, 2019

@Kevmo92 thank you for reporting this. We have added it to our backlog.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can .forceignore be used to not pull profiles that only exist in ...
I use this line in .forceignore for that: force-app/main/default/profiles. The path should be relative to where your .forceignore lives.
Read more >
How to Exclude Source When Syncing or Converting
The .forceignore file excludes files when running all the force:source:* commands, ... <md-type-file-suffix> is the file suffix for the metadata type.
Read more >
Fix the following lines in your .forceignore and add ...
I have the following forceignore file List files or directories below to ignore them when running forcesourcepush forces... ... I get error message:....
Read more >
Untitled
Remove **.md in the forceignore file and redeploy to your scratch org. ... This error comes up when I execute following command: Code:...
Read more >
Untitled
This error comes up when I execute following command: Code: sfdx force:mdapi:deploy -d ./src -w -1 -u My_Scratch_Org I've .forceignore file in root...
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