2 # shellcheck shell=bash
4 set -eu -o pipefail
+o posix
7 if (( "${NIX_DEBUG:-0}" >= 7 )); then
22 ${extraBefore+"${extraBefore[@]}"} \
23 ${params+"${params[@]}"} \
24 ${extraAfter+"${extraAfter[@]}"}
26 if [ "$pprev" != "-change" ] && [[ "$prev" != -* ]] && [[ "$p" != -* ]]; then
33 # Optionally print debug info.
34 if (( "${NIX_DEBUG:-0}" >= 1 )); then
35 # Old bash workaround, see above.
36 echo "extra flags before to @prog@:" >&2
37 printf " %q\n" ${extraBefore+"${extraBefore[@]}"} >&2
38 echo "original flags to @prog@:" >&2
39 printf " %q\n" ${params+"${params[@]}"} >&2
40 echo "extra flags after to @prog@:" >&2
41 printf " %q\n" ${extraAfter+"${extraAfter[@]}"} >&2
45 ${extraBefore+"${extraBefore[@]}"} \
46 ${params+"${params[@]}"} \
47 ${extraAfter+"${extraAfter[@]}"}