def pins.at
ezx@1.11.0.0 · src/ws/run.bend:301
import ezx@1.11.0.0/src/ws/run.bend as Run
import Base
import snap@1.4.0.0/main.bend as Sn
import ezx@1.11.0.0/src/io/file.bend as F
import ezx@1.11.0.0/src/ws/joint.bend as J
import ezx@1.11.0.0/src/ledger/manifest.bend as M
import ezx@1.11.0.0/src/pkg/pkg.bend as K
301
302def pins.at(+dir: String) -> IO(List<&2, M.Dep>):
303 do IO<List<&2, M.Dep>>:
304 mm : Maybe<&2, String> <- F.read(dir ++ "/ez.toml")
305 +out : String <- Sn.exec(["git", "-C", dir, "-c", "core.quotepath=off", "ls-files", "--",
306 ":(glob)**/ez.toml"])
307 fs : List<&2, J.Found> <- read.under(dir, lines(String.lines(Sn.text(out))))
308 +bend : String <- Sn.exec(["git", "-C", dir, "-c", "core.quotepath=off", "ls-files", "--", "*.bend"])
309 files : List<&2, K.Source> <- files.under(dir, lines(String.lines(Sn.text(bend))))
310 return pins.joint(J.joint(F.text_of(mm), fs, files))