diff --git a/install.sh b/install.sh index 2e832ad..df950ae 100755 --- a/install.sh +++ b/install.sh @@ -468,7 +468,11 @@ is_host_amd64_elf() { # Test if a location is writeable by trying to write to it. Windows does not let # you test writeability other than by writing: https://stackoverflow.com/q/1999988 test_writeable() { - path="${1:-}/test.txt" + if [ -z "${1-}" ]; then + # There's a bug if this is reached. + abort "BUG: test_writeable requires a path to test." + fi + path="$1/test.txt" if touch "${path}" 2>/dev/null; then rm "${path}" return 0