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 v2 warning when ignoring **/README.md

See original GitHub issue

Summary

.forceignore v2 warning when ignoring **/README.md

Received this warning when trying to run force:source:push, the push is successful I just get a warning.

(node:3085) Warning: The .forceignore file doesn't adhere to .gitignore format which will be the default behavior starting in Spring '21 release. More information on .gitignore format here: https://git-scm.com/docs/gitignore. Fix the following lines in your .forceignore and add '# .forceignore v2' to your .forceignore file to switch to the new behavior. (Use node --trace-warnings … to show where the warning was created) (node:3085) Warning: **/README.md

The ignore pattern in use was to ignore all README.md files in all dirs.

Steps To Reproduce:

  1. Create a project with a README.md file
  2. Add **/README.md to .forceignore
  3. Useforce:source:push
  4. You will get the error

Expected result

Seem like it is a valid ignore pattern based on git ignore, so no warning should be seen.

Actual result

I get this error instead.

(node:3085) Warning: The .forceignore file doesn't adhere to .gitignore format which will be the default behavior starting in Spring '21 release. More information on .gitignore format here: https://git-scm.com/docs/gitignore. Fix the following lines in your .forceignore and add '# .forceignore v2' to your .forceignore file to switch to the new behavior. (Use node --trace-warnings … to show where the warning was created) (node:3085) Warning: **/README.md

SFDX CLI Version(to find the version of the CLI engine run sfdx --version): SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core) image

OS and version: MacOS Big Sur: 11.2 (20D64)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gfmmoreiracommented, Aug 24, 2021

@mshanemc I am also facing this issue while adding a README.md file to forceIgnore.

Below are the lines which are triggering the warning:

# Unpackaged
**/unpackaged/README.md

The output of sfdx plugins:

@salesforce/sfdx-diff 0.0.6
@salesforce/sfdx-scanner 2.11.0
salesforcedx 52.0.0
├─ data 0.4.11
├─ apex 0.2.2
├─ limits 1.2.1
├─ custom-metadata 1.0.12
├─ schema 1.0.7
├─ user 1.3.0
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7
├─ org 1.6.6
├─ templates 51.5.0
└─ salesforce-alm 52.0.0

And the output of sfdx --version:

sfdx-cli/7.114.0 darwin-x64 node-v14.17.5

The lines seem to be adhering the gitignore format as mentioned by @lukecotter, so no apparent reason for the warning message to appear.

0reactions
lukecottercommented, Jul 1, 2021

I still see the warning when pushing, the push works though. forceignore is set to v2.

here is the warning on latest cli image

and the versions image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is SFDX deploy throwing a false warning/error regarding ...
I no longer get the error or warning on salesforcedx 50.3.1 . ... Add it .forceignore v2 as 1st line of .forceignore file....
Read more >
forceignore process is broken in Winter 2021
(node:9176) Warning: The .forceignore file doesn't adhere to .gitignore format which will be the default behavior starting in Spring '21 release ...
Read more >
How do I ignore an error on 'git pull' about my local changes ...
1. your local changes saved by `--autostash` 2. your local commits saved by `--rebase` 3. commits from upstream applied to your branch 4....
Read more >
sfdx-git-delta - npm
Generate the sfdx content in source format and destructive change from two git commits. Latest version: 5.5.0, last published: 12 days ago.
Read more >
git add a file that is ignored Code Example - Grepper
git add --force my/ignore/file.foo.
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