Skip to content

Commit 98a012a

Browse files
committed
fix: Use find instead of glob for Windows JAR exclusion compatibility
Windows bash (Git Bash/MSYS) doesn't expand globs the same way as Unix. The pattern 'arcadedb-grpcw-*.jar' wasn't matching any files, resulting in 0 JARs removed on Windows. Change from: for jar in "$JARS_DIR"/$pattern; do To: find "$JARS_DIR" -maxdepth 1 -name "$pattern" -type f This uses find which is more portable across platforms and handles Windows paths correctly. Windows build log showed: Processing pattern: arcadedb-grpcw-*.jar ✅ Removed 0 JAR(s) ✅ Package prepared (84 JARs + JRE) After fix, should show: Processing pattern: arcadedb-grpcw-*.jar - Removed: arcadedb-grpcw-25.10.1-SNAPSHOT-shaded.jar ✅ Removed 1 JAR(s) ✅ Package prepared (83 JARs + JRE) Expected impact: - Windows AMD64: 192.5M → ~157M (saves ~35M)
1 parent fd6dcee commit 98a012a

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

bindings/python/build-native.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,14 @@ if [[ -f "$EXCLUSIONS_FILE" ]]; then
122122
# Skip empty lines and comments
123123
if [[ -n "$pattern" ]] && [[ ! "$pattern" =~ ^# ]]; then
124124
echo -e "${CYAN} Processing pattern: $pattern${NC}"
125-
# Remove matching JARs
126-
shopt -s nullglob # Make glob expand to nothing if no matches
127-
for jar in "$JARS_DIR"/$pattern; do
125+
# Use find instead of glob for better cross-platform compatibility
126+
while IFS= read -r jar; do
128127
if [[ -f "$jar" ]]; then
129128
rm -f "$jar"
130129
echo -e "${YELLOW} - Removed: $(basename "$jar")${NC}"
131130
((EXCLUSION_COUNT++))
132-
else
133-
echo -e "${CYAN} - Pattern matched but not a file: $jar${NC}"
134131
fi
135-
done
136-
shopt -u nullglob
132+
done < <(find "$JARS_DIR" -maxdepth 1 -name "$pattern" -type f 2> /dev/null)
137133
fi
138134
done < "$EXCLUSIONS_FILE"
139135
echo -e "${GREEN}✅ Removed $EXCLUSION_COUNT JAR(s)${NC}"

0 commit comments

Comments
 (0)