make fix-workdir
Introduction
make fix-workdir repairs the workspace paths in .env. Product containers bind-mount the host folder that SPLENT_HOST_PROJECT_DIR names, so after you move, rename or clone the workspace again they mount the wrong directory. Run it when the pre-flight or make env-check warns about it.
[⚠] SPLENT_HOST_PROJECT_DIR is stale (breaks product bind-mounts)
make fix-workdir
🛠️ SPLENT fix-workdir
[✔] SPLENT_HOST_PROJECT_DIR re-pointed: /old/path → /home/me/splent_workspace
[✔] WORKING_DIR already correct (/workspace)
What it changes
- Creates
../.envfrom the template when it does not exist. - Sets
SPLENT_HOST_PROJECT_DIRto the real absolute path of the workspace. Inside Vagrant, detected through.vagrant/, it sets/workspace. - Sets
WORKING_DIR=/workspace. - Collapses either key into one line when it is defined more than once.
When both values are already right, it says so and changes nothing. See how the repairs write .env.
See also
make env-prepareruns this as its first step.