Skip to content

Use 'set -u' in gettextized shell scripts

So far we’ve been avoiding it, see e.g. this comment from config/chroot_local-includes/usr/local/bin/tor-browser:

# Do not "set -u", else importing gettext.sh dies
# with "ZSH_VERSION: parameter not set".

However, we can actually set -u as long as we set:

ZSH_VERSION="${ZSH_VERSION:-}"

before sourcing gettext.sh in each such script (see git grep "\. gettext\.sh" for a list of candidates).

Feature Branch: feature/9371-set-u-in-gettextized-shell-scripts

Parent Task: #9372

Original created by @anonym on 9371 (Redmine)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information