From 5211735965de3e1d1ee83c3ef90a62b4de01af82 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Mon, 20 Dec 2021 06:43:20 +0100 Subject: [PATCH] benchmarks/driver.sh: also quote path to benchmarks I had only tested with a space in the path to the fish binary, but not with a space in the path to the repository. Closes #8559 --- benchmarks/driver.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/benchmarks/driver.sh b/benchmarks/driver.sh index af32ed001..1c155ae0c 100755 --- a/benchmarks/driver.sh +++ b/benchmarks/driver.sh @@ -29,10 +29,12 @@ for benchmark in "$BENCHMARKS_DIR"/*; do fi if command -v hyperfine >/dev/null 2>&1; then + cmd1="$(quote "${FISH_PATH}") $(quote "$benchmark") > /dev/null" if [ -n "$FISH2_PATH" ]; then - hyperfine "$(quote "${FISH_PATH}") $benchmark > /dev/null" "$(quote "${FISH2_PATH}") $benchmark > /dev/null" + cmd2="$(quote "${FISH2_PATH}") $(quote "$benchmark") > /dev/null" + hyperfine "$cmd1" "$cmd2" else - hyperfine "$(quote "${FISH_PATH}") $benchmark > /dev/null" + hyperfine "$cmd1" fi fi done