Expand description
ask src <spec> — print the absolute path to a cached library source tree,
fetching on cache miss unless --no-fetch. Rust port of commands/src.ts.
run_src returns the exact stdout string on success and an error on failure;
the thin CLI wrapper prints it and maps any error to a non-zero exit. This
keeps the resolution logic unit-testable without process exits or real I/O.
Structs§
- RunSrc
Options - Options for
run_src. - SrcModel
ask src <spec> --jsonoutput — the stable machine-readable handoff that downstream tools (e.g. csp) consume.checkout_diris the version-pinned, content-stable store path they index. MirrorsSrcModelSchema.
Functions§
- run_src
- Resolve
specvia the shared checkout helper and return the text to print: the checkout path (default) or a JSONSrcModel(json). On aNoCacheErroror any resolver failure this returns an error whose message the CLI writes to stderr before exiting non-zero — matching the TS behaviour where both cases route througherror()+exit(1). - run_
src_ with run_srcwith injectable checkout deps (tests pass an offline fetcher / overridden ASK home).