I have two source folders in my project – force-app and sudipta-app. I have mentioned the same into sfdx-project.json as well like –
{
"packageDirectories": [
{
"path": "force-app",
"default": true
},
{
"path": "sudipta-app",
"default": false
}
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "48.0"
}
Now when I am trying to push source to my default scratch org, it always pushes code from force-app folder, not from sudipta-app folder. Is there any way I can mention which path to consider while pushing code into scratch org?
Command I am running:
sfdx force:source:push
Best Answer
The command
sfdx force:source:push
should work fine today.Adding CLI support for metadata types that have a decomposed (or source) format for the
force:source:deploy
,force:source:retrieve
,force:source:delete
commands is Work in progress.You can get early access to it by checking here
Note that since it is in DEV preview there won't be any support via support cases, however, you can raise any issues in the git repo and will be addressed.
There are some caveats you will need to remember with this feature
force:source:push follow deployment order indicated in the sfdx-project.json in package directories. If the dependencies are not maintained in that order force source push fails.
Weird state encountered if the metadata is reorganized into multiple folders and not started with fresh scratch orgs. Reorganize and then always test force:source:push with a new scratch org before source is versioned.