forcedotcom / cli

Salesforce CLI
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/
BSD 3-Clause "New" or "Revised" License
494 stars 78 forks source link

sfdx force:source:manifest:create does not work with Profiles #1773

Closed MarcDBehr closed 2 years ago

MarcDBehr commented 2 years ago

Summary

Running the command sfdx force:source:manifest:create --sourcepath "force-app/main/default/profiles/" --manifesttype package --outputdir [folder] results in an empty package.xml file.

Specifying a different sourcepath works fine, it only appears to be affecting Profiles

Steps To Reproduce:

  1. Open repository containing Profiles
  2. Run the command "sfdx force:source:manifest:create --sourcepath "force-app/main/default/profiles/" --manifesttype package --outputdir [folder]"
  3. Review the package.xml created in the output folder

Expected result

The package.xml file should contain the profiles from the source folder

Actual result

the package.xml file looks like:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <version>52.0</version>
</Package>

System Information

{
  "cliVersion": "sfdx-cli/7.174.0",
  "architecture": "darwin-x64",
  "nodeVersion": "node-v16.13.2",
  "pluginVersions": [
    "@dx-cli-toolbox/sfdx-toolbox-package-utils 0.8.3 (user)",
    "@mshanemc/plugin-streaming 1.1.7 (user)",
    "@mshanemc/sfdx-sosl 1.1.0 (user)",
    "@oclif/plugin-autocomplete 1.3.4 (user)",
    "@oclif/plugin-commands 2.2.0 (core)",
    "@oclif/plugin-help 5.1.14 (core)",
    "@oclif/plugin-not-found 2.3.3 (core)",
    "@oclif/plugin-plugins 2.1.1 (core)",
    "@oclif/plugin-update 3.0.2 (core)",
    "@oclif/plugin-version 1.1.2 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.6 (core)",
    "@oclif/plugin-which 2.1.0 (core)",
    "alias 2.1.5 (core)",
    "apex 1.3.0 (core)",
    "auth 2.2.15 (core)",
    "community 2.0.10 (core)",
    "config 1.4.21 (core)",
    "custom-metadata 2.0.2 (core)",
    "data 2.1.4 (core)",
    "generator 2.0.7 (core)",
    "info 2.2.0 (core)",
    "limits 2.0.5 (core)",
    "org 2.2.9 (core)",
    "packaging 1.9.4 (core)",
    "schema 2.1.10 (core)",
    "signups 1.2.8 (core)",
    "source 2.0.25 (core)",
    "telemetry 2.0.2 (core)",
    "templates 55.1.0 (core)",
    "trust 2.0.4 (core)",
    "user 2.1.13 (core)",
    "@salesforce/sfdx-diff 0.0.6 (user)",
    "@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
    "bbdoc 4.0.5 (user)",
    "salesforce-alm 54.8.3 (core)",
    "sfdmu 4.17.6 (user)",
    "sfdx-flowdoc-plugin 0.5.1 (user)",
    "sfdx-waw-plugin 1.5.0 (user)",
    "sfdxdatadicgen 0.1.2 (user)",
    "sfpowerkit 6.0.0 (user)",
    "shane-sfdx-plugins 4.43.0 (user)"
  ],
  "osVersion": "Darwin 21.6.0",
  "shell": "bash",
  "rootPath": "/usr/local/lib/node_modules/sfdx-cli"
}

Additional information

Feel free to attach a screenshot.

github-actions[bot] commented 2 years ago

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.

WillieRuemmele commented 2 years ago

Hey @MarcDBehr after a little investigating I found if I had ignored profiles via the .forceignore it wouldn't be part of the generated manifest. If I removed that entry in the .forceignore it generated it correctly like

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Admin</members>
        <name>Profile</name>
    </types>
    <version>55.0</version>
</Package>

vs with the .forceignore entry present

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <version>55.0</version>
</Package>
MarcDBehr commented 2 years ago

@WillieRuemmele Looks like that was the issue... Duh! Thanks! Closing the issue