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: guard against undefined file path in results #659

Merged
merged 4 commits into from
Dec 1, 2022

Conversation

peternhale
Copy link
Contributor

@peternhale peternhale commented Nov 29, 2022

What does this PR do?

Guards replace in a result file for an undefined filePath

What issues does this PR fix or reference?

@W-12128219@
@W-12134988@

Issue # 1827
Issue # 1823

@peternhale peternhale requested a review from mshanemc November 29, 2022 20:59
@WillieRuemmele
Copy link
Contributor

WillieRuemmele commented Nov 30, 2022

QA Notes


Manifest

before

 ➜  sfdx force:source:retrieve -x manifest.xml --retrievetargetdir ./source-retrieve
Preparing retrieve request... done
(node:60004) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use `node --trace-deprecation ...` to show where the warning was created)
ERROR running force:source:retrieve:  Cannot read properties of undefined (reading 'replace')

after

 ➜  sfdx force:source:retrieve -x manifest.xml --retrievetargetdir ./source-retrieve
Preparing retrieve request... done
=== Retrieved Source

 FULL NAME TYPE                     PROJECT PATH                                      
 ───────── ──────────────────────── ───────────────────────────────────────────────── 
 ldsUtils  LightningComponentBundle source-retrieve/lwc/ldsUtils/ldsUtils.js          
 ldsUtils  LightningComponentBundle source-retrieve/lwc/ldsUtils/ldsUtils.js-meta.xml 
=== Retrieved Source Warnings

 FILE NAME              PROBLEM                                                                            
 ────────────────────── ────────────────────────────────────────────────────────────────────────────────── 
 unpackaged/package.xml Entity of type 'LightningComponentBundle' named 'ldsUtilsNotFound' cannot be found 

CustomLabel

before:

 ➜  sfdx force:source:retrieve --retrievetargetdir=./untracked --metadata=CustomLabel:test 
Preparing retrieve request... done
ERROR running force:source:retrieve:  ENOENT: no such file or directory, stat '/Users/william.ruemmele/projects/scratches/dreamhouse-lwc/untracked/main/default'

after

 ➜  sfdx force:source:retrieve --retrievetargetdir=./untracked --metadata=CustomLabel:test 
Preparing retrieve request... done
=== Retrieved Source

 FULL NAME    TYPE         PROJECT PATH                                  
 ──────────── ──────────── ───────────────────────────────────────────── 
 CustomLabels CustomLabels untracked/labels/CustomLabels.labels-meta.xml 

@WillieRuemmele WillieRuemmele merged commit 0262ea0 into main Dec 1, 2022
@WillieRuemmele WillieRuemmele deleted the phale/W-12128219 branch December 1, 2022 00:09
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