Skip to content

sf package version create use profiles not only from path #2336

@olektymchenko

Description

@olektymchenko

Summary

sf package version create use component not only from specified path

Steps To Reproduce

I have this folders structure and only "core-package" should be packaged
core-package
unlocked-package
internal-components (which I don't want to package at all)
unnamed
The following commands were executed
sf package create --name "AAA_Test" --package-type Managed --path "aaa-core" --description "AAA Test Package Description" --target-dev-hub AAA_Prod

sf package version create --package "AAA_Test" --definition-file config/project-scratch-def.json --wait 20 --installation-key-bypass --code-coverage --target-dev-hub AAA_Prod

Expected result

Package is created

Actual result

Creation fails because sf is trying to package components not from path specified during package creation

System Information

powershell 5
{
"cliVersion": "@salesforce/cli/2.1.7",
"architecture": "win32-x64",
"nodeVersion": "node-v18.15.0",
"osVersion": "Windows_NT 10.0.19044",
"shell": "cmd.exe",
"rootPath": "C:\Users\sssssssss\AppData\Local\sf\client\2.1.7-355d833",
"pluginVersions": [
"@oclif/plugin-autocomplete 2.3.2 (core)",
"@oclif/plugin-commands 2.2.18 (core)",
"@oclif/plugin-help 5.2.13 (core)",
"@oclif/plugin-not-found 2.3.31 (core)",
"@oclif/plugin-plugins 3.1.6 (core)",
"@oclif/plugin-search 0.0.20 (core)",
"@oclif/plugin-update 3.1.26 (core)",
"@oclif/plugin-version 1.3.7 (core)",
"@oclif/plugin-warn-if-update-available 2.0.43 (core)",
"@oclif/plugin-which 2.2.25 (core)",
"@salesforce/cli 2.1.7 (core)",
"apex 2.3.6 (core)",
"auth 2.8.9 (core)",
"data 2.5.1 (core)",
"deploy-retrieve 1.16.0 (core)",
"info 2.6.31 (core)",
"limits 2.3.26 (core)",
"login 1.2.20 (core)",
"org 2.9.25 (core)",
"packaging 1.21.1 (user)",
"schema 2.3.20 (core)",
"settings 1.4.20 (core)",
"sobject 0.1.37 (core)",
"source 2.10.25 (core)",
"telemetry 2.2.3 (core)",
"templates 55.5.5 (core)",
"trust 2.4.32 (core)",
"user 2.3.24 (core)",
"@salesforce/sfdx-scanner 3.14.0 (user)",
"sfdx-git-delta 5.24.1 (user)"
]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:packagingbugIssue or pull request that identifies or fixes a bugowned by another teamThe Salesforce CLI team does not own this work but will pass on the information to the correct team.validatedVersion information for this issue has been validated

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions