def anchored

ezx@1.11.0.0 · src/git/exec.bend:29

import ezx@1.11.0.0/src/git/exec.bend as Exec
import Base
import snap@1.4.0.0/main.bend as R
import ezx@1.11.0.0/src/pkg/path.bend as P

29# a source as git is to read it. A ledger records a local path as it was
30# given, relative to the project, which is the directory ez runs in, so the
31# ledger reads the same on every clone. git reads such a path from somewhere
32# else: a fetch from inside its work directory, and `ls-remote` from the top
33# of any repository around it. Every git command here that is handed a source
34# is handed this instead.
35def anchored(+url: String) -> IO(String):
36  do IO<String>:
37    +here : String <- R.exec(["pwd"])
38    return P.anchor(String.trim(R.text(here)), url)

Uses (9)

Used by (3)