def tool.kept.nar

ezx@1.11.0.0 · src/lock/up.bend:982

import ezx@1.11.0.0/src/lock/up.bend as Up
import Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M
import ezx@1.11.0.0/src/ledger/upgrade.bend as U

982# the pinned commit weighed: its NAR hash written in when the pin has none,
983# else judged with whether it is the one the pin records
984def tool.kept.nar(fill: Bool, +rs: List<&2, Reply>, +tool: M.Tool, +tip: String, +tag: String, +nar: String) -> Pinned:
985  match fill:
986    case True{}:
987      tool.pin(Bool.or(String.is_empty(tip), String.is_empty(nar)), tool, tip, "", nar, [])
988    case False{}:
989      tool.verdict(U.judge(True{}, True{},
990        String.eq(M.source.nar(M.tool.source(tool)), nar), tip, tag), rs, tool, tip, "")

Uses (14)

Used by (1)