def find.at

ezx@1.11.0.0 · src/ez/prove.bend:22

import ezx@1.11.0.0/src/ez/prove.bend as Prove
import Base
import snap@1.4.0.0/main.bend as R
import ezx@1.11.0.0/src/share/args.bend as Args
import ezx@1.11.0.0/src/ez/sorted.bend as Sort

22# every file of a kind in the tree, sorted, so a run's report is the same twice
23# over. Base has no readdir, so this is `find`. `.claude` is skipped along with
24# `.ez`: an agent's worktree is a whole second copy of the repo living inside
25# it, and running its files would double the gate to check nothing new.
26def find.at(+what: String, +how: String) -> IO(List<&2, String>):
27  do IO<List<&2, String>>:
28    out : String <- R.exec(["find", ".", how, what,
29      "-not", "-path", "./.ez/*",
30      "-not", "-path", "./.git/*", "-not", "-path", "./.claude/*"])
31    return Sort.sort(Args.nonempty(String.lines(R.text(out))))

Uses (10)

Used by (2)