summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-12 14:56:27 +0300
committerPaul Buetow <paul@buetow.org>2026-06-12 14:56:27 +0300
commitc2ff4241715fe80ef33b6a6e6e0d2fa523ba0089 (patch)
treea69da06796ad41aea43835a9941e1d6fa018f8c6 /bin
parent08dcc822ece08c72805b18cbd663a4f7fecbf726 (diff)
Clean template context files on failure for bm0
Diffstat (limited to 'bin')
-rwxr-xr-xbin/shuriken9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/shuriken b/bin/shuriken
index 82c84db..b9df7c1 100755
--- a/bin/shuriken
+++ b/bin/shuriken
@@ -759,9 +759,12 @@ source_template_file() {
return "$status"
fi
- env -i PATH="$PATH" BASH_ENV="$context_file" \
- bash -euo pipefail -- "$template_path" >> "$output_path"
- status=$?
+ if env -i PATH="$PATH" BASH_ENV="$context_file" \
+ bash -euo pipefail -- "$template_path" >> "$output_path"; then
+ status=0
+ else
+ status=$?
+ fi
rm -f "$context_file"
if (( status != 0 )); then
return "$status"