docket: don't crash on adding a brand new docket

If we didn't have a charge for it yet, adding its new docket would
previously fail. Here we make sure this doesn't crash.

The local install case was hitting this.
This commit is contained in:
Fang 2021-09-25 18:27:14 +04:00
parent ed516900e7
commit cf73edb73c
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972
2 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,7 @@
:: $chad: State of a docket
::
+$ chad
$~ [%install ~]
$% :: Done
[%glob =glob]
[%site ~]

View File

@ -602,7 +602,10 @@
(poke-our:(pass %install) %hood kiln-install+!>([desk ship remote]))
++ uninstall
(poke-our:(pass %uninstall) %hood kiln-uninstall+!>(desk))
++ new-docket |=(d=^docket (~(jab by charges) desk |=(charge +<(docket d))))
++ new-docket
|= d=^docket
%+ ~(put by charges) desk
[d chad:(~(gut by charges) desk *charge)]
++ new-chad |=(c=chad (~(jab by charges) desk |=(charge +<(chad c))))
++ fetch-glob
^- (list card)