Skip to content

Commit

Permalink
chore: change shebang in link_all.sh to be portable (aws#33520)
Browse files Browse the repository at this point in the history
### Reason for this change

Current shebang in `link_all.sh` is `!#/bin/bash`, which does not work if the `bash` binary is not present in `/bin` (such is the case on e.g. NixOS).

### Description of changes

Change the sheband to `!#/usr/bin/env bash`, so that bash is executed from wherever it's present, not necessarily `/bin/bash`.

### Description of how you validated changes

The current script fails on NixOS for me.
The script with the updated shebang suceeds.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
gshpychka authored Feb 26, 2025
1 parent 07f0fe3 commit 7ebb92c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion link-all.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# creates symlinks under node_modules for all packages in this repo
# can be used to work against this code base.
set -euo pipefail
Expand Down

0 comments on commit 7ebb92c

Please sign in to comment.