Run.exec: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/lock/run.bend as Run Lines 619-636 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=619&end_line=636 import Base import snap@1.4.0.0/main.bend as R import ezx@1.11.0.0/src/lock/lock.bend as L import ezx@1.11.0.0/src/lock/plan.bend as Plan # one effect def exec(+lib: String, effect: Plan.Effect) -> IO(Unit): match effect: case Plan.Write{at, text}: write(at, text) case Plan.Lay{pl, hash, fs}: +dir = place(lib, pl) ++ "/" ++ hash do IO: _rm : String <- R.exec(["rm", "-rf", dir]) lay.all(dir, fs) case Plan.Drop{hash}: do IO: _rm : String <- R.exec(["rm", "-rf", ".ez/lib/" ++ hash]) return Unit{} case Plan.Say{text}: IO.print(text) case Plan.Name{nv, hash}: write(lib ++ "/names/" ++ nv, L.name.text(hash)) Uses (14): 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.print 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=Unit https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/lock.bend&name=name.text https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/plan.bend&name=Effect https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/run.bend&name=lay.all https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/run.bend&name=place https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/run.bend&name=write https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=exec