mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-01 19:02:22 +01:00
fix: warnings of ShellCheck
SC2155: Declare and assign separately to avoid masking return values. SC2164: Use cd ... || exit in case cd fails. SC2230: which is non-standard. Use builtin 'command -v' instead.
This commit is contained in:
committed by
David Peter
parent
60e00d49a9
commit
973ea984c8
4
tests/benchmarks/comparison.sh
vendored
4
tests/benchmarks/comparison.sh
vendored
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")" || exit
|
||||
|
||||
if ! which hyperfine > /dev/null 2>&1; then
|
||||
if ! command -v hyperfine > /dev/null 2>&1; then
|
||||
echo "'hyperfine' does not seem to be installed."
|
||||
echo "You can get it here: https://github.com/sharkdp/hyperfine"
|
||||
exit 1
|
||||
|
4
tests/benchmarks/run-benchmarks.sh
vendored
4
tests/benchmarks/run-benchmarks.sh
vendored
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")" || exit
|
||||
|
||||
if ! which hyperfine > /dev/null 2>&1; then
|
||||
if ! command -v hyperfine > /dev/null 2>&1; then
|
||||
echo "'hyperfine' does not seem to be installed."
|
||||
echo "You can get it here: https://github.com/sharkdp/hyperfine"
|
||||
exit 1
|
||||
|
2
tests/syntax-tests/update.sh
vendored
2
tests/syntax-tests/update.sh
vendored
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")" || exit
|
||||
|
||||
python="python3"
|
||||
if ! command -v python3 &>/dev/null; then python="python"; fi
|
||||
|
Reference in New Issue
Block a user