Skip to main content

evaluate_when

Function evaluate_when 

Source
pub fn evaluate_when(expr: &str, cwd: &Path) -> bool
Expand description

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.