Run.exec.finish: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/tool/run.bend as Run Lines 234-251 of ezx@1.11.0.0/src/tool/run.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/tool/run.bend&start_line=234&end_line=251 import Base import snap@1.4.0.0/main.bend as R import ezx@1.11.0.0/src/share/say.bend as Say import ezx@1.11.0.0/src/share/pass.bend as Pass import ezx@1.11.0.0/src/tool/plan.bend as TP # the program started with its words on ez's own stdin, stdout and stderr, # or the link written, and the status the program exited with, 0 when none # was started. What the program prints reaches the person as it prints it, # and it reads what ez would have read. def exec.finish(fin: TP.Finish) -> IO(U32): match fin: case TP.Idle{}: IO.pure(U32, 0) case TP.Launch{bin, args}: Pass.run(List.append(&2, String, [bin], args)) case TP.Link{bin, +dir, +name, says}: +at = dir ++ "/" ++ name do IO: IO.print_err(Say.linking(at)) _mk : String <- R.exec(["mkdir", "-p", dir]) +ln : String <- R.exec(["ln", "-sfn", bin, at]) link.after(R.ok(ln), at, R.text(ln), says) return 0 Uses (17): 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_err 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=List.append 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=U32 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/share/pass.bend&name=run https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/share/say.bend&name=linking https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/tool/plan.bend&name=Finish https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/tool/run.bend&name=link.after https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=exec https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=ok https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=text