Skip to content

fix(scripts): replace hardcoded /bin/bash shebangs#26939

Merged
dakejahl merged 1 commit intoPX4:mainfrom
Orkavian:use-shebang-correctly
Apr 1, 2026
Merged

fix(scripts): replace hardcoded /bin/bash shebangs#26939
dakejahl merged 1 commit intoPX4:mainfrom
Orkavian:use-shebang-correctly

Conversation

@onur-ozkan
Copy link
Copy Markdown
Contributor

Several helper scripts assumes bash is available at /bin/bash. That breaks on systems such as NixOS, where bash is resolved from PATH instead of a fixed /bin location and causes failures like bad interpreter during make format, e.g., on my host machine:

$ make format

/PX4-Autopilot/Tools/astyle/check_code_style.sh: /PX4-Autopilot/Tools/astyle/fix_code_style.sh: /bin/bash: bad interpreter: No such file or directory

This change switches these entrypoints to #!/usr/bin/env bash so they locate bash properly.

No functional changes intended.

Several helper scripts assumes bash is available at /bin/bash. That breaks on systems
such as NixOS, where bash is resolved from PATH instead of a fixed /bin location and
causes failures like `bad interpreter` during `make format`, e.g., on my host machine:

```sh
$ make format

/PX4-Autopilot/Tools/astyle/check_code_style.sh: /PX4-Autopilot/Tools/astyle/fix_code_style.sh: /bin/bash: bad interpreter: No such file or directory
```

This change switches these entrypoints to `#!/usr/bin/env bash` so they locate bash properly.

No functional changes intended.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
@onur-ozkan onur-ozkan force-pushed the use-shebang-correctly branch from ac748bb to 94dcfb6 Compare April 1, 2026 14:38
@dakejahl dakejahl merged commit 0d18be5 into PX4:main Apr 1, 2026
83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants