mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 08:11:15 -03:00
Clean up shell scripts
Some changes fix actual problems, e.g. missing spaces in square bracket tests,
and backticks unintentionally causing code execution when intended as formatting.
Others, such as conservative quoting probably work fine in the old version in
most situations, but it's nice to have some additional safety.
Using `{ ..; }` instead of `(..)` is just a small performance enhancement.
Many of these issues were identified by shellcheck, which might be useful in CI
as well.
This commit is contained in:
committed by
Johannes Altmanninger
parent
b431873ce5
commit
e10573088a
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# This script is copied into the root directory of our Docker tests.
|
||||
# It is the entry point for running Docker-based tests.
|
||||
@@ -10,10 +12,10 @@ cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug /fish-source "$@"
|
||||
# Spawn a shell if FISH_RUN_SHELL_BEFORE_TESTS is set.
|
||||
if test -n "$FISH_RUN_SHELL_BEFORE_TESTS"
|
||||
then
|
||||
bash -i || exit
|
||||
bash -i
|
||||
fi
|
||||
|
||||
ninja && ninja fish_run_tests
|
||||
(set +e; ninja && ninja fish_run_tests)
|
||||
RES=$?
|
||||
|
||||
# Drop the user into a shell if FISH_RUN_SHELL_AFTER_TESTS is set.
|
||||
|
||||
Reference in New Issue
Block a user