From 858f4db3048c5be3527e183470e93c1a72c5727c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Thu, 14 Mar 2024 06:26:07 -0400 Subject: [PATCH] buildDotnetModule: fix handling `executables` with an empty list --- .../dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"