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

fix: exclude sourcepath from component set builder #553

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

shetzel
Copy link
Contributor

@shetzel shetzel commented Aug 11, 2022

What does this PR do?

Exclude passing a sourcepath to the ComponentSetBuilder when the unpackaged flag is set. The unpackaged flag is the path to the manifest and the command should only use the manifest, not consider any local source path.

What issues does this PR fix or reference?

@W-11588116@

@shetzel shetzel requested a review from mshanemc August 11, 2022 23:03
@@ -110,7 +110,7 @@ export class Retrieve extends SourceCommand {

protected async retrieve(): Promise<void> {
const packagenames = this.getFlag<string[]>('packagenames');
if (!packagenames) {
if (!packagenames && !this.flags.unpackaged) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, that should solve it.

@WillieRuemmele
Copy link
Contributor

QA Notes:


 ➜  sfdx force:mdapi:retrieve -r force-app -k package.xml                                        
ERROR running force:mdapi:retrieve:  /Users/william.ruemmele/projects/scratches/dreamhouse-lwc/force-app/main/default/staticresources/sample_data_properties.resource-meta.xml: Expected source files for type 'StaticResource'
Retrieving metadata from [email protected]... done
➜  dreamhouse-lwc git:(main) ✗  hub:(GLOBAL - DevHub) scratch:([email protected])
 ➜  ../../oss/plugin-source/bin/run force:mdapi:retrieve -r force-app -k package.xml                                        
Retrieve ID: 09S0t000002ySmLEAU
Retrieving metadata from [email protected]... done
Wrote retrieve zip to /Users/william.ruemmele/projects/scratches/dreamhouse-lwc/force-app/unpackaged.zip

previously would parse the local FS to build a comp. set,
now just requests what's in the manifest

@WillieRuemmele WillieRuemmele merged commit b678d0c into main Aug 15, 2022
@WillieRuemmele WillieRuemmele deleted the sh/mdapi-retrieve-fix branch August 15, 2022 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants