publish: allow crash case to no-op instead
::
%remove
=/ app-path [(scot %p author.del) /[book.del]]
- =/ group-path (group-from-book app-path)
- [(metadata-poke [%remove group-path [%publish app-path]])]~
+ =/ group-path=(unit path) (group-from-book app-path)
+ ?~ group-path ~
+ [(metadata-poke [%remove u.group-path [%publish app-path]])]~
==
::
++ add
::
++ group-from-book
|= app-path=path
- ^- path
+ ^- (unit path)
?. .^(? %gu (scot %p our.bol) %metadata-store (scot %da now.bol) ~)
?: ?=([@ ^] app-path)
~& [%assuming-ported-legacy-publish app-path]
- [%'~' app-path]
+ `[%'~' app-path]
~| [%weird-publish app-path]
!!
=/ resource-indices
(scot %da now.bol)
/resource-indices
==
- =/ groups=(set path) (~(got by resource-indices) [%publish app-path])
- (snag 0 ~(tap in groups))
+ =/ groups=(unit (set path))
+ (~(get by resource-indices) [%publish app-path])
+ ?~ groups ~
+ `(snag 0 ~(tap in u.groups))
--
::
++ metadata-hook-poke
