sfpowerkit
sfpowerkit copied to clipboard
Patching package picklists for packages with multiple words throwing error
Describe the bug
When attempting to generate a static resource using the picklist patch command, the filenames are including spaces in the paths (because filepaths are being generated based on package name, not package path). Salesforce can no longer deploy static resources with spaces in them.
To Reproduce Steps to reproduce the behavior:
-
sfdx sfpowerkit:source:picklist:generatepatch -p "$packageLabel"
Expected behavior
A deployable static resource is generated. e.g. Package A creates the zip file and metadata file as:
Package_A_picklist.resource-meta.xml
Package_A_picklist.zip
instead of:
Package A_picklist.resource-meta.xml
Package A_picklist.zip
Screenshots See screenshot above for Salesforce mdapi error.
Desktop (please complete the following information):
- OS: [e.g. Windows/Linux] - MacOS and Linux
- Node Version - 16.16.0
- Version of sfpowerkit[e.g 1.45.0] - latest
- Salesforce Org Version [ In case of pre release window ] - Winter '22
Additional context [Add any other context about the problem here.]
If this line and the following command that creates the static resource would use the path instead of the package name, there's no need to do regex whitespace replacement.
(https://github.com/dxatscale/sfpowerkit/blob/7886c4431fa9369064667a44759889c634584365/src/commands/sfpowerkit/source/picklist/generatepatch.ts#L224)
Thanks @1ktribble I will add this to the fixes for September release.
Caitlyn