make fix-workdir

Repair the workspace paths in .env when they are wrong or stale.


Usage

make fix-workdir

What it does

  • Creates ../.env from the template first if it doesn’t exist yet.
  • Sets SPLENT_HOST_PROJECT_DIR to the real absolute path of the workspace (or /workspace when running inside Vagrant β€” auto-detected via .vagrant/).
  • Ensures WORKING_DIR=/workspace.

It is idempotent: if both values are already correct it reports so and changes nothing.

Why it matters

SPLENT_HOST_PROJECT_DIR is the host path that product containers bind-mount through the shared Docker socket. If you move or rename the workspace folder, the value in .env becomes stale and product containers would mount the wrong (or a non-existent) directory. The pre-flight warns about this with:

[⚠] SPLENT_HOST_PROJECT_DIR is stale (breaks product bind-mounts)

make fix-workdir is the one-command repair.

Example

πŸ› οΈ  SPLENT fix-workdir

  [βœ”] SPLENT_HOST_PROJECT_DIR re-pointed: /old/path β†’ /home/me/splent_workspace
  [βœ”] WORKING_DIR already correct (/workspace)

When to use

  • After moving, renaming, or re-cloning the workspace.
  • Whenever make env-check or the pre-flight flags a stale host path.

Back to top

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