Skip to content

Commit 50392a4

Browse files
fix(scripts): use /usr/bin/env bash shebangs (NixOS has no /bin/bash)
On NixOS (and other non-FHS systems) /bin/bash does not exist, so scripts with an absolute shebang fail to run. Switch the remaining holdouts to /usr/bin/env bash: eleven scripts/*.sh, test-infrastructure/run.sh, and the three Claude Code hook scripts emitted by src/cli/cli.c (gate, session reminder, subagent reminder). Distilled from PR DeusData#674, with parser-test coverage preserved: the infra_parse_shell* fixtures in tests/test_pipeline.c intentionally keep #!/bin/bash so absolute-path shebang extraction stays covered, and tests/repro fixtures are untouched. Also replace the GitHub-PAT-shaped fixture string flagged in the DeusData#674 thread with an obviously fake placeholder (ghp_FAKE...) that still matches the ghp_ + 36-alnum secret detector. Co-authored-by: Sandro Jäckel <sandro.jaeckel@gmail.com> Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 7b93210 commit 50392a4

14 files changed

Lines changed: 16 additions & 16 deletions

File tree

‎scripts/benchmark-search-graph.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# benchmark-search-graph.sh — Time search_graph name_pattern= queries against a
33
# codebase-memory-mcp binary to measure the regex / LIKE pre-filter performance.
44
#

‎scripts/build.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# build.sh — Clean build of production binary (standard or with UI).
33
#
44
# Usage:

‎scripts/check-nolint-whitelist.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Verify NOLINT(misc-no-recursion) only appears on whitelisted functions.
33
WHITELIST="src/foundation/recursion_whitelist.h"
44
if [ ! -f "$WHITELIST" ]; then

‎scripts/clean.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# clean.sh — Remove ALL build artifacts, caches, and generated files.
33
#
44
# Usage: scripts/clean.sh

‎scripts/embed-frontend.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# embed-frontend.sh — Convert built frontend assets into linkable object files.
33
#
44
# Usage: scripts/embed-frontend.sh <dist_dir> <output_dir>

‎scripts/env.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# env.sh — Shared environment detection for all build scripts.
33
#
44
# Sourced by test.sh, build.sh, lint.sh. Not meant to run standalone.

‎scripts/lint.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# lint.sh — Run all linters (clang-tidy + cppcheck + clang-format).
33
#
44
# Usage:

‎scripts/repro.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# repro.sh — Build + run the cumulative BUG-REPRODUCTION suite (test-repro).
33
#
44
# Unlike test.sh (the gating suite, must be GREEN), this suite is RED by design:

‎scripts/soak-test.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# soak-test.sh — Endurance test for codebase-memory-mcp.
33
#
44
# Runs compressed workload cycles: queries, file mutations, reindexes, idle periods.

‎scripts/test.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# test.sh — Clean build + run all C tests with ASan + UBSan.
33
#
44
# Usage:

0 commit comments

Comments
 (0)