Skip to main content

Module bootstrap

Module bootstrap 

Source

Structs§

BootstrapCtx
BootstrapReport
StepResult

Enums§

StepStatus

Functions§

copy_no_follow
Copy the contents of src into dst as a fresh regular file, refusing to follow any symlink at dst. src permissions are preserved on unix.
evaluate_when
Evaluate a [[bootstrap.command]].when expression against the given worktree. Supports the keyword predicates file_exists:, cmd_exists:, env_set:, env_eq:, glob_exists:, plus the boolean operators !, &&, || with conventional precedence (! > && > ||). Unknown keyword predicates default to true so older configs keep running while the doctor surfaces them as warnings.
run
run_core
trailing_lines
when_atoms
Return every atom string contained in a when expression, dropping the boolean operators. Callers (e.g. doctor::check_when_predicates) can then validate each atom independently — w.starts_with(prefix) on the raw expression misses negated atoms (!env_set:CI) and unsupported keywords sitting on the RHS of && / ||.
write_no_follow
Companion to copy_no_follow for callers that already hold the payload in memory (e.g. the inline-fallback branch in [resolve_missing]). Same TOCTOU-closing semantics: dst must not exist and must not be a symlink, or open() fails.