Skip to content

fix: use /usr/bin/env bash instead of direct /bin/bash in scripts - #6706

Merged
rfay merged 7 commits into
ddev:masterfrom
rfay:20241109_use_bin_env
Nov 11, 2024
Merged

rfay merged 7 commits into
ddev:masterfrom
rfay:20241109_use_bin_env

Conversation

@rfay

@rfay rfay commented Nov 9, 2024 •

Copy link
Copy Markdown
Member

The Issue

After many years of knowing the option of using #!/usr/bin/env bash at the top of bash scripts, I finally hit a system where it mattered,

See discord: https://discord.com/channels/664580571770388500/1303975088605102110

In nixOS, /bin/bash is not provided. This causes much weeping and gnashing of teeth.

But there's no reason we can't use the standard technique.

How This PR Solves The Issue

Change #!/bin/bash and #!/bin/sh

TODO

This still needs an image push for all the affected images.

Manual Testing Instructions

Automated Testing Overview

Release/Deployment Notes

@github-actions github-actions Bot added the bugfix label Nov 9, 2024
@github-actions

github-actions Bot commented Nov 9, 2024 •

Copy link
Copy Markdown

@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Nov 9, 2024
@rfay
rfay marked this pull request as ready for review November 10, 2024 02:48
@rfay
rfay requested review from a team as code owners November 10, 2024 02:48
@rfay
rfay requested a review from stasadev November 10, 2024 02:48

@stasadev stasadev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.

@@ -1,4 +1,4 @@
#!/usr/bin/env expect -f
#!/usr/bin/env -S expect -f

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For reference:

$ env --help
  -S, --split-string=S  process and split S into separate arguments;
                        used to pass multiple arguments on shebang lines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants