Skip to content

Commit

Permalink
fix: windows can not deploy folder with "/"
Browse files Browse the repository at this point in the history
  • Loading branch information
exiahuang committed Dec 12, 2024
1 parent bfd0ea0 commit ad3bf45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/collections/componentSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ const constructFullName = (registry: RegistryAccess, type: MetadataType, fullNam
// ReportFolders are deployed/retrieved as Reports. If a ReportFolder is being added append
// a "/" so the metadata API can identify it as a folder.
['DashboardFolder', 'ReportFolder', 'EmailTemplateFolder'].includes(type.name) && !fullName.endsWith('/')
? `${fullName}/`
? `${fullName}`
: registry.getParentType(type.name)?.strategies?.recomposition === 'startEmpty' && fullName.includes('.')
? // they're reassembled like CustomLabels.MyLabel
fullName.split('.')[1]
Expand Down
4 changes: 2 additions & 2 deletions test/resolve/manifestResolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ describe('ManifestResolver', () => {
data: Buffer.from(`<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>foo/</members>
<members>foo/subfoo/</members>
<members>foo</members>
<members>foo/subfoo</members>
<members>foo/subfoo/MySubFooReport1</members>
<members>foo/subfoo/MySubFooReport2</members>
<members>bar/MyBarReport1</members>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<name>EmailTemplate</name>
</types>
<types>
<members>TopFolder/</members>
<members>TopFolder/ChildFolder/</members>
<members>TopFolder</members>
<members>TopFolder/ChildFolder</members>
<members>TopFolder/ChildFolder/Report_in_Child_Folder_qz4</members>
<members>TopFolder/Copy_of_Top_level_report_DOj</members>
<members>unfiled$public/Top_level_report_cZJ</members>
Expand Down

0 comments on commit ad3bf45

Please sign in to comment.