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

How to use “sfdx force:source:pull” when folders other than “main/default” are used and components are added in the scratch org? #2

Open
KeithClarke opened this issue Feb 2, 2018 · 2 comments

Comments

@KeithClarke
Copy link

KeithClarke commented Feb 2, 2018

I've setup the folder structure for a new project following the patterns identified here. When I add e.g. a new SObject in the scratch org and use:

sfdx force:source:pull

the new components are put in a fixed folder "main/default" - there is no option to nominate the correct folder. So the folder structure is compromised.

(When components are already present locally in folders other than "main/default" the pull does place the changes correctly.)

Is there a work-around for this problem? If there isn't this multiple folder approach needs revising. So far I've wasted several hours trying to find a work around.

(Same question posted here https://salesforce.stackexchange.com/questions/206847/how-to-use-sfdx-forcesourcepull-when-folders-other-than-main-default-are-u.)

@tmowbrey
Copy link

I believe this is the way the system is designed. All new changes made in the Salesforce org are put in the "default" folder when using sfdx force:source:pull. This ensures that the CLI always knows where changes go that you have not yet allocated to a different part of your folder structure.

Once you move the file to another part of the folder structure, the CLI retains that information and then is able to maintain that change going forward.

This makes perfect sense to me, until I tell a file where to go, the system doesn't know, hence I have a default place for files the system doesn't know what to do with.

@loganm
Copy link

loganm commented Mar 2, 2018

I've been wondering about adding the main/default source folder to the .gitignore file. This would force contributors to move the newly added source folders to an appropriate directory. I worry that the default folder will become a dumping ground for all source files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants