tauri-dotenv-working-directory

Installation
SKILL.md

Tauri Dotenvy Working Directory Fix

Problem

When adding dotenvy to a Tauri app to load environment variables, relative paths like ../../.env fail because the working directory during cargo tauri dev is not what you'd expect from the file structure.

Context / Trigger Conditions

Error symptoms:

  • GHOST_URL not set or similar "env var not set" errors
  • GhostClient::from_env() or API clients fail to initialize
  • dotenvy::from_filename("../../.env") returns Err
  • App works when env vars are exported manually but not via .env
Installs
1
First Seen
Apr 1, 2026