diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh index 97dd15c17dcf..e3671728af35 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh +++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh @@ -30,7 +30,8 @@ wrapDotnetProgram() { dotnetFixupHook() { echo "Executing dotnetFixupPhase" - if [ "${executables-}" ]; then + # check if executables is declared (including empty values, in which case we generate no executables) + if declare -p executables &>/dev/null; then for executable in ${executables[@]}; do path="${installPath-$out/lib/$pname}/$executable"