diff --git a/scripts/redeploy-fleetd.sh b/scripts/redeploy-fleetd.sh index 5d46f28..0095b31 100755 --- a/scripts/redeploy-fleetd.sh +++ b/scripts/redeploy-fleetd.sh @@ -306,10 +306,12 @@ systemd_loaded() { # never assigned to a global: a global set inside a `$( )` subshell dies with that subshell. # This function packs BOTH values (kind and detail) onto that one stdout line, joined by # $SUPERVISOR_DETAIL_SEP, and the caller unpacks them on its own side of the subshell boundary. -# 2. This script runs under `set -euo pipefail` (line 50), so an unset variable is a loud -# failure. Do not add a `${VAR:-default}` anywhere downstream to paper over a value that -# should always be there — that hides a lost value instead of surfacing it (fleetd #497's -# defect class). +# 2. This script runs under `set -u` (part of the `set -euo pipefail` at the top of the file), so +# an unset variable is a loud failure. Do not add a `${VAR:-default}` anywhere downstream to +# paper over a value that should always be there — that hides a lost value instead of +# surfacing it (fleetd #497's defect class). The mechanism is named rather than cited by line +# number on purpose: a line number in a comment goes stale on the next insert above it, and +# this one already had — it said line 50 while the `set` line was at 54. # 3. Every `case` on this function's return value needs an explicit final `*)` arm, chosen by # whether that caller ACTS on the value (`die` — an unrecognised value must never be silently # driven) or only DISPLAYS it (`echo`/`warn` and continue — a diagnostic must not go silent on