def tree.walk
ezx@1.11.0.0 · src/lock/run.bend:338
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/git/git.bend as Git
import ezx@1.11.0.0/src/pkg/pkg.bend as K
import ezx@1.11.0.0/src/pkg/path.bend as P
import ezx@1.11.0.0/src/lock/up.bend as Up
338
339
340def tree.walk(+work: String, +at: String, +nar: String) -> IO(Up.Answer):
341 do IO<Up.Answer>:
342 +p : K.Pkg <- K.pkg_in(work, at)
343 +fs : List<&2, K.Item> <- IO.pure(List<&2, K.Item>, K.pkg.files(p))
344 ss : List<&2, String> <- disk.all(K.pkg.root(p), fs)
345 +rt : String <- IO.pure(String, Git.root.rel(P.join(work, at), K.pkg.root(p), at))
346 _rm : String <- R.exec(["rm", "-rf", work])
347 return Up.Checkout{nar, rt, K.manifest_of(fs), ss}