Commit f285998
authored
fix: Resolve PID file path resolution in local-dev-all target (#366)
Problem:
After PR #360 merge, running 'make local-dev-all' failed with:
/bin/sh: ../.dev-pids/backend.pid: No such file or directory
Root Cause:
The 'local-dev-all' target used relative paths (../.dev-pids/) after
changing directories with 'cd backend &&' and 'cd frontend &&'. In the
subshell context after the background operator '&', these relative paths
failed to resolve correctly, causing PID file writes to fail.
Solution:
1. Capture absolute project root path at start: PROJECT_ROOT=$(pwd)
2. Use absolute paths for all PID and log files throughout the target
3. Consolidate all commands into single shell execution with semicolons
to ensure PROJECT_ROOT variable persists across all operations
Changes:
- Line 123: Capture PROJECT_ROOT=$(pwd) at target start
- Lines 124-156: Use $$PROJECT_ROOT/ prefix for all .dev-pids and logs
- Changed from multiple @ prefixed lines to single continuous shell script
- Backend PID: ../.dev-pids/backend.pid → $$PROJECT_ROOT/.dev-pids/backend.pid
- Frontend PID: ../.dev-pids/frontend.pid → $$PROJECT_ROOT/.dev-pids/frontend.pid
- Backend log: ../logs/backend.log → $$PROJECT_ROOT/logs/backend.log
- Frontend log: ../logs/frontend.log → $$PROJECT_ROOT/logs/frontend.log
Testing:
- Verified absolute paths work regardless of working directory
- Ensured PID file checks reference same absolute paths
- Confirmed 'make local-dev-stop' still works (uses relative paths from project root)
Fixes post-PR #360 regression where local development restart failed
Signed-off-by: manavgup <manavg@gmail.com>1 parent 848b1bc commit f285998
1 file changed
+26
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
0 commit comments