Skip to content

Conversation

@Baitinq
Copy link

@Baitinq Baitinq commented Jan 11, 2026

Summary

  • Replace #!/bin/bash with #!/usr/bin/env bash in all shell scripts and documentation
  • Fixes compatibility issues on systems like NixOS where bash is not located at /bin/bash

Motivation

The hardcoded /bin/bash shebang breaks on several systems:

  • NixOS: Doesn't use traditional FHS paths, bash is not at /bin/bash
  • BSD variants: May have bash installed in different locations
  • Custom installations: Systems where bash is installed in non-standard locations

Using /usr/bin/env bash resolves the bash executable from the user's PATH, making the scripts portable across all Unix-like systems.

🤖 Generated with Claude Code

Replace `#!/bin/bash` with `#!/usr/bin/env bash` in all shell scripts
and documentation examples. This fixes compatibility issues on systems
like NixOS where bash is not located at /bin/bash.

The `/usr/bin/env bash` approach uses PATH to locate bash, making the
scripts portable across different Unix-like systems including Linux
distributions, macOS, BSD variants, and NixOS.

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Copy link

@gui-wf gui-wf left a comment

Choose a reason for hiding this comment

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

This is an awesome change!
For OSes that don't have the bash binary at /bin/bash,
Like NixOS

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