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-check can see and flag the host path; check:env cannot.


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es