Meta: Ensure the correct log file path is used with WPT.sh compare

Previously, using abolute paths with `WPT.sh compare` would fail, as
directories were always assumed to be relative to the working directory.
This commit is contained in:
Tim Ledbetter 2025-07-15 21:10:59 +01:00 committed by Jelle Raaijmakers
commit 117ff3778a
Notes: github-actions[bot] 2025-07-17 08:52:29 +00:00

View file

@ -680,7 +680,7 @@ if [[ "$CMD" =~ ^(update|clean|run|serve|compare|import|list-tests)$ ]]; then
;;
compare)
INPUT_LOG_NAME="$(pwd -P)/$1"
INPUT_LOG_NAME="$(realpath "$1")"
if [ ! -f "$INPUT_LOG_NAME" ]; then
echo "Log file not found: \"${INPUT_LOG_NAME}\""
usage;