fix(mcp): create SQLite parent dir so first service start succeeds #100
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/YT-42-mcp-sqlite-parent-dir"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
db::open'screate_if_missing(true)creates the SQLite database file but not its parent directory, so a freshyt mcp service installon a host without~/.local/share/youtrack-cli/crash-looped withcode: 14 unable to open database fileuntil systemd's start limit tripped.Fix both layers (defense in depth):
db::opennow ensures the parent directory of any file-backed SQLite URL exists before connecting, and the installer creates it at install time so permission errors surface during install rather than on first boot. The path is parsed out of the URL via the sharedyoutrack_mcp::parent_dir_for_url(sqlx's ownget_filenameresolution), so a--database-urloverride is honored and in-memory URLs (:memory:,mode=memory) are skipped.#YT-42