From fae7e1a9871c3e0204147ec45680070cecded99a Mon Sep 17 00:00:00 2001
From: Alex Sears <searsaw@users.noreply.github.com>
Date: Wed, 21 Oct 2020 15:38:46 -0400
Subject: [PATCH] Add print to find

The `find` call in the Makefile doesn't actually output any `*.libsonnet` file due to the way `find` handles operators. This was discovered using GNU `find` on a Mac. From the manpages:

> Please  note  that -a when specified implicitly (for example by two tests appearing without an explicit operator between them) or explicitly has higher precedence than -o.  This means that find . -name afile -o -name bfile -print will never print afile.

A simple addition of `-print` to force the print fixes the issue.
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 54c18d3b..9411829e 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ vendor: $(JB_BIN) jsonnetfile.json jsonnetfile.lock.json
 
 .PHONY: fmt
 fmt: $(JSONNETFMT_BIN)
-	find . -name 'vendor' -prune -o -name '*.libsonnet' -o -name '*.jsonnet' -print | \
+	find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
 		xargs -n 1 -- $(JSONNETFMT_BIN) $(JSONNETFMT_ARGS) -i
 
 .PHONY: test
-- 
GitLab