check.sh: export gettext extraction file variable

Some versions of `/bin/sh`, e.g. the one on FreeBSD, do not propagate
variables set on a command through shell functions. This results in
`FISH_GETTEXT_EXTRACTION_FILE` being set in the `cargo` function, but
not for the actual `cargo` process spawned from the function, which
breaks our localization scripts and tests. Exporting the variable
prevents that.

Fixes #11896

Closes #11899
This commit is contained in:
Daniel Rainer
2025-10-07 02:40:21 +02:00
committed by Johannes Altmanninger
parent 6829c9d678
commit 1d36b04ea6

View File

@@ -49,7 +49,10 @@ if [ -n "$FISH_TEST_MAX_CONCURRENCY" ]; then
fi
template_file=$(mktemp)
FISH_GETTEXT_EXTRACTION_FILE=$template_file cargo build --workspace --all-targets --features=gettext-extract
(
export FISH_GETTEXT_EXTRACTION_FILE="$template_file"
cargo build --workspace --all-targets --features=gettext-extract
)
if $lint; then
PATH="$build_dir:$PATH" "$workspace_root/build_tools/style.fish" --all --check
for features in "" --no-default-features; do