summaryrefslogtreecommitdiff
path: root/share/rust/template/macros.rs.tera
diff options
context:
space:
mode:
Diffstat (limited to 'share/rust/template/macros.rs.tera')
-rw-r--r--share/rust/template/macros.rs.tera7
1 files changed, 4 insertions, 3 deletions
diff --git a/share/rust/template/macros.rs.tera b/share/rust/template/macros.rs.tera
index 7a65e0f..cc1d9c4 100644
--- a/share/rust/template/macros.rs.tera
+++ b/share/rust/template/macros.rs.tera
@@ -8,8 +8,7 @@
{% if type in ['number', 'int', 'uint'] %}{{text}}
{%- elif type in ['text', 'word']%}
// "{{text | commentsafe }}"
- &base64_decode("{{text | base64}}"
- )
+ &base64_decode("{{text | base64}}")
{%- elif type in ['file'] %}
{
use std::path::PathBuf;
@@ -21,10 +20,12 @@
.expect("Unable to find file at runtime")
.clone()
}
+ {%- elif type in ['path'] %}
+ std::path::PathBuf::from(base64_decode("{{ text | base64 }}"))
{%- else %} /* WOAH unknown type {{step.types[name]}} */ {{text}}
{%- endif %}
)
{% endif -%}
{% endfor -%}
- .build(format!("{} {}", "{{step.kind | lower}}", base64_decode("{{step.text | base64}}")))
+ .build(format!("{} {}", "{{step.kind | lower}}", base64_decode("{{step.text | base64}}")), {{ step.origin | location }})
{%- endmacro builder -%}