pub struct Requirement {
pub name: String,
pub args: Vec<String>,
}Expand description
One entry in a Requires: list: a job to run first, and the arguments to run
it with.
Comma-separated, and an entry in parentheses carries arguments, borrowing
just’s (dist module) shape:
Requires: lint, (dist bonus-die)
Requires: (dist {{ module }})A bare name takes no arguments, which is what every Requires: meant before
this existed, so old files keep working.
{{ name }} inside an argument resolves against the arguments of the job
that declares the requirement. Unlike {{ }} in a script this is not an
injection risk: the value becomes an argument to the dependency, which binds
it as an environment variable, and is never spliced into a script’s source.
A dependency that then templates it into its own script is refused by
run_agent exactly as before.
Fields§
§name: StringThe job to run first.
args: Vec<String>Positional arguments for it, as written, before {{ }} resolution.
Trait Implementations§
Source§impl Clone for Requirement
impl Clone for Requirement
Source§fn clone(&self) -> Requirement
fn clone(&self) -> Requirement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more