Requires
The requires
key can be set at the top level of a hermit.toml
file to apply a set of required tags to all actions within that file.
It is an array of strings, where each string is a tag requirement.
Tag requirements can be:
- Positive: The tag must be present. This can be specified with a
+
prefix or no prefix. e.g.,"mytag"
or"+mytag"
. - Negative: The tag must not be present. This is specified with a
-
or~
prefix. e.g.,"-mytag"
or"~mytag"
.
Example
# This entire config file will only be processed on non-Windows systems.
requires = ["-os=windows"]
[[link]]
source = "my-linux-tool"
target = "~/.local/bin/my-linux-tool"
[[link]]
source = "my-macos-tool"
target = "~/.local/bin/my-macos-tool"
requires = ["os=macos"] # This adds to the global 'requires'