fix: Final robust env loader fix

This commit is contained in:
2026-04-16 16:02:10 -04:00
parent 90ddcdff43
commit 5226c246e5
3 changed files with 16 additions and 6 deletions

View File

@@ -41,12 +41,17 @@ fi
# 2. Launch
if [ -f "opencortex.asd" ]; then
if [ -f .env ]; then
export \$(grep -v '^#' .env | xargs)
# Robustly export variables without triggering shell syntax errors
while IFS= read -r line || [[ -n "$line" ]]; do
if [[ ! "$line" =~ ^# ]] && [[ "$line" =~ = ]]; then
export "$line"
fi
done < .env
fi
echo -e "${BLUE}Starting OpenCortex Brain...${NC}"
sbcl --non-interactive \
--eval "(load \"~/quicklisp/setup.lisp\")" \
--eval "(push \"\$(pwd)/\" asdf:*central-registry*)" \
--eval "(push \"$(pwd)/\" asdf:*central-registry*)" \
--eval "(ql:quickload :opencortex)" \
--eval "(opencortex:main)"
fi