Run.whole.listed: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/lock/run.bend as Run Lines 476-492 of ezx@1.11.0.0/src/lock/run.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/lock/run.bend&start_line=476&end_line=492 import Base import snap@1.4.0.0/main.bend as R import ezx@1.11.0.0/src/pkg/pkg.bend as K import ezx@1.11.0.0/src/lock/up.bend as Up # the checkout, its `.git` removed, weighed, and every file of it read; then # removed. Nothing is laid: `ez add` lays the tree from its plan. # the files of a checkout, read, once `find` has listed them. A listing that # failed is refused rather than read: `find` writes what it could not reach # to stderr, which snap answers beside the paths (SNAP-ANS-4), and such a # line is no path of the package. def whole.listed(ok: Bool, +work: String, +nar: String, +text: String) -> IO(Up.Answer): match ok: case True{}: do IO: fs : List<&2, K.Source> <- whole.read(work, nonempty(String.lines(text))) _rm : String <- R.exec(["rm", "-rf", work]) return Up.Cloned{nar, fs} case False{}: do IO: _rm : String <- R.exec(["rm", "-rf", work]) return Up.Miss{"ez: could not list the checkout: " ++ String.trim(text)} Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.lines https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.trim https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/run.bend&name=nonempty https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/run.bend&name=whole.read https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/up.bend&name=Answer https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pkg/pkg.bend&name=Source https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=exec