Skip to content

chore: commit every shell script as 100755 - #161

Merged
gatezh merged 1 commit into
masterfrom
chore/sh-file-modes
Sep 23, 2026
Merged

gatezh merged 1 commit into
masterfrom
chore/sh-file-modes

Conversation

@gatezh

@gatezh gatezh commented Sep 23, 2026

Copy link
Copy Markdown
Owner

What

Sets the exec bit on the two shell scripts committed as 100644 and records a rule in .claude/CLAUDE.md, so all seven tracked .sh files are 100755.

Why

Two scripts (claude-bun/.devcontainer/init-firewall.sh, claude-code/.devcontainer/init-plugins.sh) were 644, while their counterparts in sibling directories were 755. No rule explained the split, and #125 flipped the two files without anyone noticing.

755 is the right rule, not just the majority:

  • All seven scripts have a shebang.
  • Unlike the issue suggests, one consumer path does depend on the bit. claude-code/.devcontainer/claude-sandbox/devcontainer.json bind-mounts the project's init-firewall.sh to /usr/local/bin/init-firewall.sh and runs it by path (sudo /usr/local/bin/init-firewall.sh). A bind mount keeps the host file's mode.

Changes

  • claude-bun/.devcontainer/init-firewall.sh: 100644 → 100755
  • claude-code/.devcontainer/init-plugins.sh: 100644 → 100755
  • .claude/CLAUDE.md Code Style: added the rule and the one-line check (git ls-files -s '*.sh')

Notes

  • The claude-bun image is unaffected, because its Dockerfile COPYs the script and then runs chmod +x. The build-claude-bun.yml path filter will still trigger a rebuild, and the resulting image will be byte-identical.
  • No CI check was added. The issue treats that as an optional follow-up if the modes drift again.

Fixes #127

Two of the seven tracked scripts were 100644 while their siblings were
100755, with no rule separating them. All seven have a shebang, and the
sandbox template bind-mounts init-firewall.sh and executes it by path, so
the exec bit is the correct default. Record the rule in CLAUDE.md.

Fixes #127
@gatezh
gatezh merged commit 87f2c62 into master Sep 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize .sh file modes across the repo

1 participant