def doctor.root

ezx@1.11.0.0 · src/ws/run.bend:422

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/ws/joint.bend as J
import ezx@1.11.0.0/src/pkg/pkg.bend as K
import ezx@1.11.0.0/src/ws/doctor.bend as Doc

422# a workspace root's ledger and every member's, read for the doctor
423def doctor.root(+text: String) -> IO(Doc.Doctored):
424  do IO<Doc.Doctored>:
425    +out : String <- Sn.exec(["git", "-c", "core.quotepath=off", "ls-files", "--", ":(glob)**/ez.toml"])
426    +fs : List<&2, J.Found> <- read.found(lines(String.lines(Sn.text(out))))
427    +bend : String <- Sn.exec(["git", "-c", "core.quotepath=off", "ls-files", "--", "*.bend"])
428    files : List<&2, K.Source> <- files.under(".", lines(String.lines(Sn.text(bend))))
429    return Doc.joint(J.joint(text, fs, files), text, fs)

Uses (16)

Used by (1)