Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kheaders: use
command -v
to test for existence of cpio
Commit 13e1df0 ("kheaders: explicitly validate existence of cpio command") added an explicit check for `cpio` using `type`. However, `type` in `dash` (which is used in some popular distributions and base images as the shell script runner) prints the missing message to standard output, and thus no error is printed: $ bash -c 'type missing >/dev/null' bash: line 1: type: missing: not found $ dash -c 'type missing >/dev/null' $ For instance, this issue may be seen by loongarch builders, given its defconfig enables CONFIG_IKHEADERS since commit 9cc1df4 ("LoongArch: Update Loongson-3 default config file"). Therefore, use `command -v` instead to have consistent behavior, and take the chance to provide a more explicit error. Fixes: 13e1df0 ("kheaders: explicitly validate existence of cpio command") Signed-off-by: Miguel Ojeda <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
- Loading branch information