From 8a9cf7fc5c0ebfe1f9a32cd39aacd35cd9760c6a Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 13 Nov 2020 11:12:25 +0100 Subject: Remove indention in script phases This patch removes the indention when building the script. It also adds the phase name to the "phase-end-comment" line. Signed-off-by: Matthias Beyer --- src/package/script.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/package/script.rs b/src/package/script.rs index a12e185..c8cde19 100644 --- a/src/package/script.rs +++ b/src/package/script.rs @@ -34,13 +34,14 @@ impl<'a> ScriptBuilder<'a> { for name in phaseorder { match package.phases().get(name) { Some(Phase::Text(text)) => { - script.push_str(&format!(r#" - ### phase {name} - {text} - ### / phase + script.push_str(&indoc::formatdoc!(r#" + ### phase {} + {} + ### / {} phase "#, - name = name.as_str(), - text = text, + name.as_str(), + text, + name.as_str(), )); script.push_str("\n"); -- cgit v1.2.3