diff --git a/Makefile.Common b/Makefile.Common index 1bce621096fe..e370566008a6 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -268,11 +268,11 @@ CHANGED_GOLANG_SOURCES?=$(shell git diff main --name-only | grep -E '.*\.go$$' | .PHONY: for-affected-components for-affected-components: @echo "Checking for affected components..." - @if [ -z '$(CHANGED_GOLANG_SOURCES)' ]; then \ + @if [ -z '$${CHANGED_GOLANG_SOURCES}' ]; then \ echo "No go source changes detected in shippable code."; \ else \ cd $(SRC_ROOT); \ - DEPENDENT_PKGS=$$(echo $(CHANGED_GOLANG_SOURCES) | xargs sed -n 's|^package .* // import "\(.*\)"$$|\1|p' | uniq); \ + DEPENDENT_PKGS=$$(echo $${CHANGED_GOLANG_SOURCES} | xargs sed -n 's|^package .* // import "\(.*\)"$$|\1|p' | uniq); \ if [ -z '$${DEPENDENT_PKGS}' ]; then \ echo "No other package depends on the one being changed."; \ else \ @@ -289,11 +289,11 @@ CHANGED_GOLANG_TESTS?=$(shell git diff main --name-only | grep -E '.*_test\.go$$ .PHONY: run-changed-tests run-changed-tests: @echo "Checking for affected tests..." - @if [ -z '$(CHANGED_GOLANG_TESTS)' ]; then \ + @if [ -z '$${CHANGED_GOLANG_TESTS}' ]; then \ echo "No go test changes detected."; \ else \ cd $(SRC_ROOT); \ - AFFECTED_TEST_DIRS=$$(echo $(CHANGED_GOLANG_TESTS) | tr ' ' '\n' | xargs dirname | uniq); \ + AFFECTED_TEST_DIRS=$$(echo $${CHANGED_GOLANG_TESTS} | tr ' ' '\n' | xargs dirname | uniq); \ if [ -z '$${AFFECTED_TEST_DIRS}' ]; then \ echo "Failed to find the affected test directories."; \ else \