From 7ebb92c7b0a0e8790ced9f2dda2de9867f44480d Mon Sep 17 00:00:00 2001 From: Glib Shpychka <23005347+gshpychka@users.noreply.github.com> Date: Thu, 27 Feb 2025 01:43:54 +0200 Subject: [PATCH] chore: change shebang in link_all.sh to be portable (#33520) ### 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* --- link-all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/link-all.sh b/link-all.sh index 03a94f7e12a05..141a8bdf4548e 100755 --- a/link-all.sh +++ b/link-all.sh @@ -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