From 48631b550f9d98497a90b85dfc989a4b5f90ca67 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 17 Oct 2024 22:33:35 -0700 Subject: [PATCH] Makefile: fix error from test When running make test, there appears an error: /bin/sh: 1: test: go test -exec sudo: unexpected operator or /bin/sh: line 1: test: go test -exec sudo: binary operator expected (depending on which shell is used). This is caused by CMD value containing extra quotes (from RUN_VIA_SUDO=-exec "sudo -n") which test sees as an extra option. Enclose test argument in single quotes to fix the issue. Signed-off-by: Kir Kolyshkin --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dc1f173..152b1dc 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ clean: .PHONY: foreach foreach: ## Run $(CMD) for every package. - @if test -z "$(CMD)"; then \ + @if test -z '$(CMD)'; then \ echo 'Usage: make foreach CMD="commands to run for every package"'; \ exit 1; \ fi