def cache.home
import ezx@1.11.0.0/src/tool/world.bend as Worldimport Base
import ezx@1.11.0.0/src/pkg/path.bend as P
155# the cache root: `$XDG_CACHE_HOME/ez/tool`, otherwise `$HOME/.cache/ez/tool`,
156# taken from where ez runs when it is relative, so every path the plan names
157# is absolute; None when neither variable is set
158def cache.home(+here: String, +home: String) -> Maybe<&2, String>:
159 Bool.pick(Maybe<&2, String>, String.is_empty(home), None{},
160 Some{P.anchor(here, home) ++ "/.cache/ez/tool"})