From 6be03d7cc424eb5902a3d03f9a1fec34589efcb5 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Wed, 1 Oct 2025 18:26:34 +0200 Subject: [PATCH] update_translations.sh: fix test invocation when passed a file in non-extant directory Need to make sure test arguments are not empty lists. --- build_tools/update_translations.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/update_translations.fish b/build_tools/update_translations.fish index 476b9763a..c50c2edcb 100755 --- a/build_tools/update_translations.fish +++ b/build_tools/update_translations.fish @@ -45,8 +45,8 @@ if test -z $argv[1] else set -l po_dir_id (stat --format='%d:%i' -- $po_dir) for arg in $argv - set -l arg_dir_id (stat --format='%d:%i' -- (dirname $arg)) - if test $po_dir_id != $arg_dir_id + set -l arg_dir_id (stat --format='%d:%i' -- (dirname $arg) 2>/dev/null) + if test $po_dir_id != "$arg_dir_id" echo "Argument $arg is not a file in the directory $(realpath $po_dir)." echo "Non-option arguments must specify paths to files in this directory." echo ""