Skip to main content

Module condition

Module condition 

Source
Expand description

when conditions in tak.toml, written in expr — the language mise uses for its own conditions — and evaluated with expr-lang.

A benchmark or subject whose when is false is left out of the run before anything about it is rendered, so a subject for a tool that is not installed does not need the variables naming it either.

In scope:

  • env — tak’s environment, as a map: env.VLT_BIN != ""
  • os, arch — as Rust names them: "linux", "macos", "x86_64", "aarch64"
  • ci — whether CI is set to anything but "" or "false"
  • bench, subject — the names being decided on (subject is empty for a benchmark’s own when)

Built without expr-lang’s optional features: the operators, ??, ?:, and the string and collection builtins are there; matches, JSON and the date functions are not.

Functions§

check
Check a condition parses, without evaluating it. Run when tak.toml is loaded, so a typo fails before any benchmark runs.
eval
Evaluate a condition for bench (and subject, if deciding on one).