Fixed environment issues
This commit is contained in:
@@ -14,7 +14,11 @@
|
|||||||
"Bash(/c/Users/b.peck/.local/bin/claude mcp:*)",
|
"Bash(/c/Users/b.peck/.local/bin/claude mcp:*)",
|
||||||
"mcp__obsidian__obsidian_update_note",
|
"mcp__obsidian__obsidian_update_note",
|
||||||
"mcp__obsidian__obsidian_list_notes",
|
"mcp__obsidian__obsidian_list_notes",
|
||||||
"mcp__obsidian__obsidian_read_note"
|
"mcp__obsidian__obsidian_read_note",
|
||||||
|
"Bash(pip install:*)",
|
||||||
|
"Bash(python3 -m pip install requests python-dotenv)",
|
||||||
|
"Bash(python3 -c \"import sys; print\\(sys.executable\\)\")",
|
||||||
|
"Bash(python -c \"import sys; print\\(sys.executable\\)\")"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,10 +20,13 @@ cat > "$POST_PUSH" << 'EOF'
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# post-push hook — sync markdown files to WikiJS after every push.
|
# post-push hook — sync markdown files to WikiJS after every push.
|
||||||
cd "$(git rev-parse --show-toplevel)"
|
cd "$(git rev-parse --show-toplevel)"
|
||||||
if command -v python3 &>/dev/null; then
|
PYTHON=$(command -v python3 2>/dev/null || command -v python 2>/dev/null || true)
|
||||||
python3 tools/publish_docs.py || echo "[wikijs] publish failed — run manually: python3 tools/publish_docs.py"
|
if [[ -z "$PYTHON" ]]; then
|
||||||
|
echo "[wikijs] python not found — skipping doc sync"
|
||||||
|
elif ! "$PYTHON" -c "import requests" &>/dev/null; then
|
||||||
|
echo "[wikijs] requests not installed — skipping doc sync (run: $PYTHON -m pip install requests python-dotenv)"
|
||||||
else
|
else
|
||||||
echo "[wikijs] python3 not found — skipping doc sync"
|
"$PYTHON" tools/publish_docs.py || echo "[wikijs] publish failed — run manually: $PYTHON tools/publish_docs.py"
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,9 @@ from dotenv import load_dotenv
|
|||||||
|
|
||||||
REPO_ROOT = Path(__file__).parent.parent
|
REPO_ROOT = Path(__file__).parent.parent
|
||||||
|
|
||||||
# Load secrets from docker/.env (symlink to ~/.config/ignition-dev/secrets.env)
|
# Load secrets — try docker/.env symlink first, then the canonical secrets file
|
||||||
load_dotenv(REPO_ROOT / "docker" / ".env")
|
load_dotenv(REPO_ROOT / "docker" / ".env")
|
||||||
|
load_dotenv(Path.home() / ".config" / "ignition-dev" / "secrets.env")
|
||||||
|
|
||||||
WIKIJS_URL = os.environ.get("WIKIJS_URL", "https://wikijs.primecontrols-dev.com")
|
WIKIJS_URL = os.environ.get("WIKIJS_URL", "https://wikijs.primecontrols-dev.com")
|
||||||
WIKIJS_API_KEY = os.environ["WIKIJS_API_KEY"] # loud failure if missing
|
WIKIJS_API_KEY = os.environ["WIKIJS_API_KEY"] # loud failure if missing
|
||||||
|
|||||||
Reference in New Issue
Block a user