Skip to content

fix: use portable shebang in sample hooks#1815

Open
maxonvim wants to merge 1 commit intobasecamp:mainfrom
maxonvim:fix/portable-shebang-sample-hooks
Open

fix: use portable shebang in sample hooks#1815
maxonvim wants to merge 1 commit intobasecamp:mainfrom
maxonvim:fix/portable-shebang-sample-hooks

Conversation

@maxonvim
Copy link
Copy Markdown

@maxonvim maxonvim commented Apr 7, 2026

On some systems, like NixOS or certain BSDs, the shell isn't located at /bin/sh. Using #!/usr/bin/env sh instead resolves this by searching the user's PATH, matching the pattern already used in the Ruby sample hooks (pre-connect.sample and pre-deploy.sample).

On some systems, like NixOS or certain BSDs, the shell isn't located at /bin/sh. Using #!/usr/bin/env sh instead resolves this by searching the user's PATH, matching the pattern already used in the Ruby sample hooks.
Copilot AI review requested due to automatic review settings April 7, 2026 09:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the shebangs in shell script sample hooks to use a more portable pattern that works across different systems like NixOS and certain BSD distributions.

Changes:

  • Updated shebangs from #!/bin/sh to #!/usr/bin/env sh in seven shell sample hook files (pre-proxy-reboot, pre-build, pre-app-boot, post-proxy-reboot, post-deploy, post-app-boot, and docker-setup)
  • This aligns with the pattern already established in the Ruby sample hooks (pre-connect and pre-deploy)

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/kamal/cli/templates/sample_hooks/pre-proxy-reboot.sample Updated shebang to portable format
lib/kamal/cli/templates/sample_hooks/pre-build.sample Updated shebang to portable format
lib/kamal/cli/templates/sample_hooks/pre-app-boot.sample Updated shebang to portable format
lib/kamal/cli/templates/sample_hooks/post-proxy-reboot.sample Updated shebang to portable format
lib/kamal/cli/templates/sample_hooks/post-deploy.sample Updated shebang to portable format
lib/kamal/cli/templates/sample_hooks/post-app-boot.sample Updated shebang to portable format
lib/kamal/cli/templates/sample_hooks/docker-setup.sample Updated shebang to portable format

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants