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: trim metadata type, and name to prevent unnecessary errors #179

Merged
merged 2 commits into from
Aug 26, 2021

Conversation

WillieRuemmele
Copy link
Contributor

@WillieRuemmele WillieRuemmele commented Aug 24, 2021

What does this PR do?

deploy -m "ApexClass: GeocodingService" would cause a no source backed components Error, trim the metadata type and name to ensure we're parsing everything correctly

What issues does this PR fix or reference?

@W-9803972@ forcedotcom/cli#1151

Copy link
Contributor

@mshanemc mshanemc left a comment

Choose a reason for hiding this comment

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

approved, with suggestion

@@ -82,10 +82,10 @@ export class ComponentSetBuilder {
metadata.metadataEntries.forEach((rawEntry) => {
const splitEntry = rawEntry.split(':');
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const splitEntry = rawEntry.split(':');
const splitEntry = rawEntry.split(':').map(entry => entry.trim())

will trim both, so you don't have to trim in 2 places OR worry about the untrimmed type on line 87

@shetzel shetzel merged commit 2011caa into main Aug 26, 2021
@shetzel shetzel deleted the wr/splitMetadata branch August 26, 2021 16:03
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