Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test/system: Avoid conditionals only supported by Bash's built-in 'test'
The '[' and 'test' implementations from GNU coreutils don't support '-v' as a way to check if a shell variable is set [1]. Only Bash's built-in implementations do. This is quite confusing and makes it difficult to find out what '-v' actually does. eg., 'man --all test' only shows the manual for the GNU coreutils version, which doesn't list '-v' [1], and, 'man --all [' only shows the manual for Bash's built-ins, which also doesn't list '-v'. One has to go to the bash(1) manual to find it [2]. Elsewhere in the code base [3], the same thing is accomplished with '-z' and parameter substitution, which are more widely supported and, hence, easier to find documentation for. [1] https://manpages.debian.org/testing/coreutils/test.1.en.html [2] https://linux.die.net/man/1/bash [3] Commit 84ae385 #1334 #1341
- Loading branch information