2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-12 19:10:26 +00:00

No longer need to be in 'tests' directory

Your BASH version is checked; if it's 3, you will have to ignore this
commit, unfortunately. To be fair, if you're on 3 (major), you have
more pressing matters. :P
This commit is contained in:
terminalforlife 2020-11-17 15:28:53 +00:00
parent 380b52688d
commit acebbe0d67

View File

@ -95,6 +95,10 @@ while [ "$1" ]; do
shift
done
# Thank you, Chubin. Feature apparently added in version 3.0 alpha, so should
# be OK, but if anyone is having issues, just `cd` to the 'tests' directory.
[ ${BASH_VERSINFO[0]:-0} -eq 3 ] || cd "${BASH_SOURCE[0]%/*}"
# Confirm we are in the right place.
git rev-parse --is-inside-work-tree 1> /dev/null 2>&1 ||
Err 0 'Not inside a Git repository.'