From 9f156d0adc269b92f1badb2093b7773e3deae440 Mon Sep 17 00:00:00 2001 From: happysalada Date: Fri, 25 Jun 2021 19:12:58 +0900 Subject: [PATCH] setup.sh: fatal: Undefined variable define hook arrays before assigning to them --- pkgs/stdenv/generic/setup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 83a623ef0801..b598fc9b47b7 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -312,6 +312,10 @@ declare -a pkgTargetHookVars=(envTargetTargetHook) declare -a pkgHookVarVars=(pkgBuildHookVars pkgHostHookVars pkgTargetHookVars) +# those variables are declared here, since where and if they are used varies +# shellcheck disable=SC2034 +declare -a preFixupHooks fixupOutputHooks preConfigureHooks postFixupHooks postUnpackHooks unpackCmdHooks + # Add env hooks for all sorts of deps with the specified host offset. addEnvHooks() { local depHostOffset="$1"