You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sfdx force:source:retrieve -p pathToFile is issued against file that is not in the main/default folder, the command will create a new file in main/default folder instead of overwriting existing file.
This is against documentation which says: The source you retrieve overwrites the corresponding source files in your local project.
Steps To Reproduce:
Create folder structure similar to this:
./force-app/commons/classes/ClassA.class
./force-app/main/default/ClassB.class
@jvolkov - this is a very old issue that was fixed as part of the MPD (multiple package directory) phase 2 work. I don't know what versions of the CLI or plugins you're using, what OS, or if you have multiple package directories defined in your sfdx-project.json. I'm going to close this issue because I cannot reproduce it as specified in the repro steps with the latest CLI and plugins. If you have other steps that reproduce the problem you're seeing, please open a new issue with the repro steps, cli version, plugin versions, and OS.
Summary
When
sfdx force:source:retrieve -p pathToFile
is issued against file that is not in the main/default folder, the command will create a new file in main/default folder instead of overwriting existing file.This is against documentation which says:
The source you retrieve overwrites the corresponding source files in your local project.
Steps To Reproduce:
Create folder structure similar to this:
./force-app/commons/classes/ClassA.class
./force-app/main/default/ClassB.class
Issue command
sfdx force:source:retrieve -p ./force-app/commons/core/classes/apex/ClassA.cls
Expected result
File in /commons/classes should be overwritten:
./force-app/commons/classes/ClassA.class [updated from sandbox]
./force-app/main/default/ClassB.class
Actual result
New file is created:
./force-app/commons/classes/ClassA.class
./force-app/main/default/ClassA.class
./force-app/main/default/ClassB.class
SFDX CLI Version(to find the version of the CLI engine run sfdx --version):
sfdx-cli/7.32.0-b30e0302f0 win32-x64 node-v10.15.3
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)
OS and version:
Windows 10.0.18362
The text was updated successfully, but these errors were encountered: