def lock.go

ezx@1.11.0.0 · src/ez/cmd.bend:143

import ezx@1.11.0.0/src/ez/cmd.bend as Cmd
import Base
import ezx@1.11.0.0/src/lock/run.bend as Run
import ezx@1.11.0.0/src/lock/plan.bend as P
import ezx@1.11.0.0/src/ez/ends.bend as E

143# `ez lock`, plain or `--upgrade`, is the planner's
144# (lock/plan.bend, lock/up.bend): a plain lock copies every pin as the ledger
145# has it, refuses one it would have to fill, and never writes ez.toml; an
146# upgrade moves the selected pins, writes ez.toml once, `.gitignore`, the
147# rewritten imports and the lock in one plan. Either writes nothing when it
148# refuses, and a missing ledger is refused. `--package` is only a filter on an
149# upgrade.
150# `--package` without `--upgrade` is refused before anything is read
151# (`E.lock.flags`).
152def lock.go(flags: P.Outcome, up: Bool, +name: String) -> IO(Unit):
153  match flags:
154    case P.Success{}:
155      Run.run(up, name)
156    case P.Refused{why}:
157      Run.end(P.Refused{why})

Uses (7)

Used by (1)