From bba358d866e21e873cc77c605183e190a843d213 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Wed, 26 Aug 2026 18:40:34 +0100 Subject: [PATCH] =?UTF-8?q?fix(shell):=20declare=20the=20shell=20=E2=80=94?= =?UTF-8?q?=20shebang=20where=20executed,=20directive=20where=20sourced?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit shellcheck SC2148 ('target shell is unknown') on 1 files here. Deliberately NOT a blanket shebang. The files split by how they are USED: * 0 executed (have +x, never source'd) -> added '#!/usr/bin/env bash' * 1 sourced (referenced by source/.) -> added '# shellcheck shell=bash' A source'd file is never run as its own process, so a shebang there is misleading — it claims an execution model the file does not have. The shellcheck directive states the dialect without making that false claim. Found by an estate-wide sweep of 5,111 tracked scripts across 375 repos: 85 files lack a shell declaration. 40 of those were left alone deliberately — they are vendored duplicates (7 identical copies of one recoverer.sh) or a nested kith/ tree, and 37 of the 40 are never invoked by name anywhere, so editing them would be churn in vendored code. Remaining SC2148 in this repo after the change: 0 --- shell/coord-hooks.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/shell/coord-hooks.sh b/shell/coord-hooks.sh index 700897f..944e2db 100644 --- a/shell/coord-hooks.sh +++ b/shell/coord-hooks.sh @@ -1,3 +1,4 @@ +# shellcheck shell=bash # SPDX-License-Identifier: MPL-2.0 # Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) #