From 6f18c33b54410376a471898d5f60b4ac01aa3eec Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Tue, 9 Jun 2020 08:51:24 -0700 Subject: [PATCH] toolbox/projtool.pl: use the shell to run `command -v` Although some systems do actually have a `/usr/bin/command` executable, it's only guaranteed to be available via the POSIX shell `sh`. Make sure that perl's "qx" command actually runs the shell rather than taking a shortcut by explicitly using `sh -c`. Signed-off-by: Kyle J. McKay --- toolbox/projtool.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolbox/projtool.pl b/toolbox/projtool.pl index 7625459..b4b65fc 100755 --- a/toolbox/projtool.pl +++ b/toolbox/projtool.pl @@ -748,7 +748,7 @@ sub cmd_adopt { } my $rd = get_readme_desc($readme); if ($rd ne "automatic" && $rd ne "suppressed") { - my $xmllint = qx(command -v xmllint); chomp $xmllint; + my $xmllint = qx(sh -c 'command -v xmllint'); chomp $xmllint; if (-f $xmllint && -x $xmllint) { my $dummy = {README => $readme}; my ($cnt, $err) = Girocco::Project::_lint_readme($dummy, 0); -- 2.11.4.GIT