Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forceignore does not support exclamation point "!" #2644

Closed
petter-eikeland opened this issue Jan 14, 2024 · 2 comments
Closed

Forceignore does not support exclamation point "!" #2644

petter-eikeland opened this issue Jan 14, 2024 · 2 comments
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@petter-eikeland
Copy link

Summary

According to the docs, forceignore should mimic gitignore. Gitignore supports using exclamation points to negate a certain pattern, e.g. for individual files or subdirectories: https://git-scm.com/docs/gitignore
It would be very useful if forceignore could support the same

Steps To Reproduce

  1. Clone into dreamhouse-lwc
  2. Create scratch org
  3. Try to deploy using sf project deploy start -d issues/exclamation-ignore-bug

Expected result

Account.TestField1__c should have been deployed, and Account.TestField2__c should be ignored.
Because the following lines were added to .forceignore:

issues/exclamation-ignore-bug/objects
!issues/exclamation-ignore-bug/objects/Account/fields/TestField1__c.field-meta.xml

Actual result

Both Account.TestField1__c & Account.TestField2__c was ignored. No changes was deployed

System Information

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.24.4",
  "nodeVersion": "node-v20.10.0",
  "osVersion": "Darwin 22.6.0",
  "rootPath": "/Users/user/.local/share/sf/client/2.24.4-c9898a2",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.5 (core)",
    "@oclif/plugin-commands 3.1.0 (core)",
    "@oclif/plugin-help 6.0.10 (core)",
    "@oclif/plugin-not-found 3.0.8 (core)",
    "@oclif/plugin-plugins 4.1.15 (core)",
    "@oclif/plugin-search 1.0.11 (core)",
    "@oclif/plugin-update 4.1.7 (core)",
    "@oclif/plugin-version 2.0.11 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.9 (core)",
    "@oclif/plugin-which 3.0.14 (core)",
    "@salesforce/cli 2.24.4 (core)",
    "1commerce 0.0.10 (user)",
    "apex 3.0.17 (core)",
    "auth 3.2.0 (core)",
    "community 3.0.12 (user)",
    "data 3.0.14 (core)",
    "deploy-retrieve 3.1.0 (core)",
    "info 3.0.15 (core)",
    "limits 3.1.2 (core)",
    "marketplace 1.0.16 (core)",
    "org 3.2.2 (core)",
    "packaging 2.1.0 (user)",
    "schema 3.1.0 (core)",
    "settings 2.0.15 (core)",
    "signups 2.0.15 (user)",
    "sobject 1.1.0 (core)",
    "source 3.1.3 (core)",
    "telemetry 3.1.9 (core)",
    "templates 56.0.9 (core)",
    "trust 3.3.1 (core)",
    "user 3.2.1 (core)",
    "@salesforce/sfdx-plugin-lwc-test 1.1.1 (user)",
    "sfdmu 4.32.2 (user)",
    "sfdx-browserforce-plugin 4.0.0 (user)"
  ]
}
@petter-eikeland petter-eikeland added the investigating We're actively investigating this issue label Jan 14, 2024
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Jan 14, 2024
@shetzel
Copy link
Contributor

shetzel commented Jan 14, 2024

The CLI uses this library for the .forceignore implementation: https://github.com/kaelzhang/node-ignore

According to this closed issue on their repo, your usecase is working as designed:
kaelzhang/node-ignore#79 (comment)

If you feel there is something we can do about this please reopen.

@shetzel shetzel closed this as completed Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

2 participants