Skip to content

Commit e2cd284

Browse files
authored
Fix find recursion in examples discovery (#129)
The find command that discovers example directories recurses into subdirectories. Adding \`-maxdepth 0\` prevents this. Without the fix, any example with a subdirectory would be treated as a separate example, breaking the build. Discovered in ponylang/hobby.
1 parent 19580ff commit e2cd284

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ endif
4040
PONYC := $(PONYC) $(SSL)
4141

4242
SOURCE_FILES := $(shell find $(SRC_DIR) -name *.pony)
43-
EXAMPLES := $(notdir $(shell find $(EXAMPLES_DIR)/* -type d))
43+
EXAMPLES := $(notdir $(shell find $(EXAMPLES_DIR)/* -maxdepth 0 -type d))
4444
EXAMPLES_SOURCE_FILES := $(shell find $(EXAMPLES_DIR) -name *.pony)
4545
EXAMPLES_BINARIES := $(addprefix $(BUILD_DIR)/,$(EXAMPLES))
4646

0 commit comments

Comments
 (0)