hermes: create ~/.hermes before writing .env on a fresh home

On a first run the key-changed branch writes ~/.hermes/.env before the
installer has created ~/.hermes, so it died with "Directory nonexistent"
and failed bootstrap (seen on a fresh Coder workspace).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-19 13:39:59 -04:00
co-authored by Claude Opus 5
parent 86b8e51646
commit c0f1fc21b7
+3 -1
View File
@@ -74,7 +74,9 @@ if [ "$KEY_CHANGED" -eq 1 ] && [ -f "$HOME/.config/mcp-sync/key" ]; then
fi
say "hermes: Updated LITELLM_KEY in ~/.hermes/.env"
else
# Create .env if it doesn't exist
# Create .env if it doesn't exist. On a fresh home this runs BEFORE the
# installer below has created ~/.hermes, so make the directory first.
mkdir -p "$HOME/.hermes"
printf 'LITELLM_KEY=%s\n' "$NEW_KEY" >"$HOME/.hermes/.env"
say "hermes: Created ~/.hermes/.env with LITELLM_KEY"
fi