def search

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

import ezx@1.11.0.0/src/ws/run.bend as Run
import Base
import snap@1.4.0.0/main.bend as Sn

65# the search for the root, from where ez runs up to the top of its checkout
66def search() -> IO(Searched):
67  do IO<Searched>:
68    +pre : String <- Sn.exec(["git", "rev-parse", "--show-prefix"])
69    +top : String <- Sn.exec(["git", "rev-parse", "--show-toplevel"])
70    search.at(here.git(Bool.and(Sn.ok(pre), Sn.ok(top)), Sn.text(pre)), String.trim(Sn.text(top)))

Uses (12)

Used by (5)