Closed stevieb9 closed 11 months ago
It appears as though if the perl being removed is the last one in the perls_custom.json
file, the process will succeed. ie, if the perl being removed causes the file to become an empty list, all is well. If there's a write of a still-installed custom perl, it fails
Here is what the custom perl json looks like after importing two snapshots (ie. custom perls):
[
{
"name": "test",
"custom": false,
"file": null,
"url": null,
"ver": null,
"csum": null
},
{
"name": "steve",
"custom": false,
"file": null,
"url": null,
"ver": null,
"csum": null
}
]
The fix was to assign an empty string to the values of the Strawberry Perl
object if the values we try to assign are null
:
data["url"] = perlBase.Url ?? "";
Also, after that fix, ver
didn't behave properly because the version sorter in BB.JsonWrite()
requires a string of three integers, separated by two decimal points. The empty string caused that code to throw:
data["ver"] = perlBase.Version ?? "0.0.0";