make env-check
Validate the workspace .env. Read-only, changes nothing.
Usage
make env-check
What it checks
| Check | Severity | Meaning |
|---|---|---|
| Duplicate variables | fail | The same key is defined more than once. The last one silently wins. |
| Malformed lines | fail | A line that is neither blank, a #comment, nor KEY=value. |
Missing .env |
fail | The workspace .env does not exist. |
Stale SPLENT_HOST_PROJECT_DIR |
warn | The host path doesn’t match the real workspace folder. |
Missing WORKING_DIR |
warn | Should be /workspace. |
Dangling SPLENT_APP |
warn | Points to a product folder that doesn’t exist. |
Drift vs .env.example |
warn | Keys missing from, or unknown to, the template. |
Exit code is 1 if any fail is found, 0 otherwise (warnings included).
Example output
🩺 SPLENT .env check (/home/.../splent_workspace/.env)
[✖] Duplicate variable 'GITHUB_TOKEN' (lines 3,4) — last one silently wins.
[✔] No malformed lines
[⚠] SPLENT_HOST_PROJECT_DIR is stale (breaks product bind-mounts):
in .env : /old/path
expected : /home/.../splent_workspace
Repair it with: make fix-workdir
[✔] SPLENT_APP unset (detached mode)
❌ .env has problems — resolve the items above.
Relationship to the pre-flight
This is the same validation embedded in scripts/preflight_cli.sh, so every
make setup / make docker-up
already runs it. Call make env-check on its own when you want the full report
with its banner and summary, without starting anything.
This is the host-side counterpart of
splent check:env, which runs inside the container and additionally checks tool versions and credentials.env-checkcan see and flag the host path;check:envcannot.
Related
make fix-workdir/make fix-app. Fix what it flags.make fix-env. Repair, then re-check in one step.