summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/interpreters/python/wrap.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/python/wrap.sh b/pkgs/development/interpreters/python/wrap.sh
index 030b3d2b6d8..f10ba003432 100644
--- a/pkgs/development/interpreters/python/wrap.sh
+++ b/pkgs/development/interpreters/python/wrap.sh
@@ -84,10 +84,10 @@ wrapPythonProgramsIn() {
                     # We need to support both the case when makeWrapperArgs
                     # is an array and a IFS-separated string.
                     # TODO: remove the string branch when __structuredAttrs are used.
-                    if [[ "$(declare -p makeWrapperArgs)" =~ ^'declare -a makeWrapperArgs=' ]]; then
+                    if [[ "${makeWrapperArgs+defined}" == "defined" && "$(declare -p makeWrapperArgs)" =~ ^'declare -a makeWrapperArgs=' ]]; then
                         local -a user_args=("${makeWrapperArgs[@]}")
                     else
-                        local -a user_args="($makeWrapperArgs)"
+                        local -a user_args="(${makeWrapperArgs:-})"
                     fi
 
                     local -a wrapProgramArgs=("${wrap_args[@]}" "${user_args[@]}")