Empty Static Resource files can't be included in a sf package version
- Dominant language
- No language data
- Stars
- 571
- Forks
- 80
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 3
Description
### Summary
Running sf package version create with a Static Resource that is empty will error.
### Steps To Reproduce
Sample repo is available here: https://github.com/mekadigital/md-package-tests-empty-resource
Clone repo and run
% sf package version create --path force-app --wait 1000 --code-coverage -x
Warning: Record types defined in the scratch org definition file will stop being capitalized by default in a future release.
Set the `org-capitalize-record-types` config var to `true` to enforce capitalization.
Version create.... Create version status: Error
Error (MultipleErrorsError): Multiple errors occurred:
(1) An unexpected error occurred. Please contact Salesforce Support and provide the following error code: 1057494537-1609187 (-852365351)
Adding a whitespace character to the staticresource solves the issue.
### Expected result
Package created
### Actual result
Package can't be created.
(I've already worked around this by removing the resource, but it took so long to work out why it wasn't working I raised the issue)
### System Information
zsh
```json
{
"architecture": "darwin-x64",
"cliVersion": "@salesforce/cli/2.51.6",
"nodeVersion": "node-v20.15.0",
"osVersion": "Darwin 22.6.0",
"rootPath": "/Users/nich/.local/share/sf/client/2.51.6-e49d0be",
"shell": "zsh",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.1.7 (core)",
"@oclif/plugin-commands 4.0.7 (core)",
"@oclif/plugin-help 6.2.6 (core)",
"@oclif/plugin-not-found 3.2.11 (core)",
"@oclif/plugin-plugins 5.3.7 (core)",
"@oclif/plugin-search 1.2.3 (core)",
"@oclif/plugin-update 4.4.9 (core)",
"@oclif/plugin-version 2.2.8 (core)",
"@oclif/plugin-warn-if-update-available 3.1.9 (core)",
"@oclif/plugin-which 3.2.8 (core)",
"@salesforce/cli 2.51.6 (core)",
"apex 3.2.5 (core)",
"auth 3.6.36 (core)",
"data 3.5.5 (core)",
"deploy-retrieve 3.9.17 (core)",
"info 3.3.18 (core)",
"limits 3.3.18 (core)",
"marketplace 1.2.18 (core)",
"org 4.3.5 (core)",
"packaging 2.7.1 (core)",
"schema 3.3.19 (core)",
"settings 2.3.8 (core)",
"sobject 1.4.19 (core)",
"source 3.5.5 (core)",
"telemetry 3.6.2 (core)",
"templates 56.3.3 (core)",
"trust 3.7.13 (core)",
"user 3.5.18 (core)"
]
}
```
### Additional information
Contributor guide
Assessment
This issue has not been assessed yet.