Skip to content

New MR: Test for executables: replace 'which' with more robust 'command -v'

John Crawley requested to merge johnraff-guest/live-build:replace_which_2 into master

Instances of: if [ $(which ] have been replaced with: if command -v >/dev/null which is considered to be more robust in a range of environments.

NOTE: scripts/build/chroot_archives: line 259: if [ "${LB_APT}" = "aptitude" ] && [ ! $(Chroot chroot "which aptitude") ] has been left untouched because the chroot might require a more complex command which would need more testing.

manpages/Makefile: line 42: @if [ ! -x "$$(which po4a 2>/dev/null)" ];
has been left untouched because I am not sufficiently familiar with makefiles.

Merge request reports

Loading