Skip to content

Commit 15866aa

Browse files
committed
Meta: Prevent "HOMEBREW_PREFIX: unbound variable" in shell_include.sh
...when this is used in scripts that `set -u`. No intended behavior change.
1 parent cadda39 commit 15866aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Meta/shell_include.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ find_executable() {
3737
paths=("/usr/sbin" "/sbin")
3838

3939
if [ "$(uname -s)" = "Darwin" ]; then
40-
if [ -n "${HOMEBREW_PREFIX}" ]; then
40+
if [ -n "${HOMEBREW_PREFIX:-}" ]; then
4141
paths+=("${HOMEBREW_PREFIX}/opt/e2fsprogs/bin" "${HOMEBREW_PREFIX}/opt/e2fsprogs/sbin")
4242
elif command -v brew > /dev/null 2>&1; then
4343
if prefix=$(brew --prefix e2fsprogs 2>/dev/null); then

0 commit comments

Comments
 (0)