make fix-workdir
Repair the workspace paths in .env when they are wrong or stale.
Usage
make fix-workdir
What it does
- Creates
../.envfrom the template first if it doesnβt exist yet. - Sets
SPLENT_HOST_PROJECT_DIRto the real absolute path of the workspace (or/workspacewhen 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-checkor the pre-flight flags a stale host path.
Related
make env-checkβ detects the problem.make env-prepareβ runs this as its first step.