Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

fix: improve Makefile and duckdb.go for better environment handling

wizardchen2a5cf57589be
diff --git a/Makefile b/Makefile
index 6306f902d..691abf67f 100644
--- a/Makefile
+++ b/Makefile
@@ -248,8 +248,9 @@ build-lite:
else \
echo ">> No frontend/package.json, skipping frontend"; \
fi
- EDITION=lite eval "$$(./scripts/get_version.sh env)"; \
- LDFLAGS="$$(EDITION=lite ./scripts/get_version.sh ldflags)"; \
+ export EDITION=lite; \
+ eval "$$(./scripts/get_version.sh env)"; \
+ LDFLAGS="$$(./scripts/get_version.sh ldflags)"; \
CGO_ENABLED=1 \
CGO_CFLAGS="-Wno-deprecated-declarations" \
CGO_LDFLAGS="-Wl,-no_warn_duplicate_libraries" \
diff --git a/cmd/download/duckdb/duckdb.go b/cmd/download/duckdb/duckdb.go
index 838851a9f..499027782 100644
--- a/cmd/download/duckdb/duckdb.go
+++ b/cmd/download/duckdb/duckdb.go
@@ -14,6 +14,7 @@ func downloadSpatial() {
if err != nil {
panic(err)
}
+ defer sqlDB.Close()
// Try to install spatial extension (may already be installed or network unavailable)
installSQL := "INSTALL spatial;"