def whole.listed
ezx@1.11.0.0 · src/lock/run.bend:476
import ezx@1.11.0.0/src/lock/run.bend as Run
import Base
import snap@1.4.0.0/main.bend as R
import ezx@1.11.0.0/src/pkg/pkg.bend as K
import ezx@1.11.0.0/src/lock/up.bend as Up
476
477
478
479
480
481
482def whole.listed(ok: Bool, +work: String, +nar: String, +text: String) -> IO(Up.Answer):
483 match ok:
484 case True{}:
485 do IO<Up.Answer>:
486 fs : List<&2, K.Source> <- whole.read(work, nonempty(String.lines(text)))
487 _rm : String <- R.exec(["rm", "-rf", work])
488 return Up.Cloned{nar, fs}
489 case False{}:
490 do IO<Up.Answer>:
491 _rm : String <- R.exec(["rm", "-rf", work])
492 return Up.Miss{"ez: could not list the checkout: " ++ String.trim(text)}