1
Fork 0

Support NixOS and others non-FHS Linux distros

As it expects Bash to be at `/bin/bash`, the current implementation
fails to execute on NixOS, given that there bash is in a non-standard
path (i.g. `/nix/store/<hash>-bash-interactive-<version>/bin/bash`).

This patch specifically changes `/bin/bash` paths to use `/usr/bin/env bash`,
which should give the correct path in every Unix system.

Signed-off-by: Luis Holanda <luiscmholanda@gmail.com>
nix
Luis Holanda 2022-07-27 17:33:52 -03:00 committed by Motiejus Jakštys
parent c122a0d1c7
commit c4125cf13b
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail

View File

@ -76,7 +76,7 @@ def toolchains(
},
)
ZIG_TOOL_WRAPPER = """#!/bin/bash
ZIG_TOOL_WRAPPER = """#!/usr/bin/env bash
set -e
if [[ -n "$TMPDIR" ]]; then