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.