From 0117b060e206e6e4bb3bf1acd48e7c0c5397b7b0 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <jean-paul@privatestorage.io>
Date: Wed, 7 Sep 2022 14:36:43 +0000
Subject: [PATCH] Apply 1 suggestion(s) to 1 file(s)

---
 nixos/modules/monitoring/exporters/tahoe.nix | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nixos/modules/monitoring/exporters/tahoe.nix b/nixos/modules/monitoring/exporters/tahoe.nix
index b04d69db..b891804c 100644
--- a/nixos/modules/monitoring/exporters/tahoe.nix
+++ b/nixos/modules/monitoring/exporters/tahoe.nix
@@ -62,6 +62,7 @@ in {
         # textfile collector won't read a partial file.
         # See https://github.com/prometheus/node_exporter#textfile-collector
         script = ''
+          set -euo pipefail
           NUM_CORRUPTION_ADVISORIES=$(find /storage/corruption-advisories/ -type f | wc -l)
           echo "tahoe_corruption_advisories_total $NUM_CORRUPTION_ADVISORIES" > "${cfg.outFile}.tmp"
 
-- 
GitLab