mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
bin/brew: handle unbound variable.
This can fail when running `bin/brew` under `set -u`.
This commit is contained in:
parent
352f6ac047
commit
ac7f3d6182
2
bin/brew
2
bin/brew
@ -150,7 +150,7 @@ export_homebrew_env_file() {
|
|||||||
do
|
do
|
||||||
[[ "${line}" = "${VAR}"* ]] && invalid_variable="${VAR}"
|
[[ "${line}" = "${VAR}"* ]] && invalid_variable="${VAR}"
|
||||||
done
|
done
|
||||||
[[ -n "${invalid_variable}" ]] && continue
|
[[ -n "${invalid_variable:-}" ]] && continue
|
||||||
|
|
||||||
export "${line?}"
|
export "${line?}"
|
||||||
done <"${env_file}"
|
done <"${env_file}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user