Commit 20d3a5f
committed
Start server process in dir where cmd was called
When a Spring server boots, it maintains its directory
for the duration of its life-cycle. This means that if you've changed
directories and run a Spring command, the process will start within the
context of the original directory.
This is problematic in the use case of engines, where an engine command
may be run from the context of the host application, and then run again
from the engine directory. In this scenario, the process will assume its
working directory is the host application instead of the engine.
The solution proposed here is to change the current directory to where
the Spring command was called from. The directory is taken from ENV['PWD']1 parent 647b8c3 commit 20d3a5f
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
175 | 180 | | |
176 | 181 | | |
177 | 182 | | |
| |||
237 | 242 | | |
238 | 243 | | |
239 | 244 | | |
| 245 | + | |
240 | 246 | | |
241 | 247 | | |
242 | 248 | | |
| |||
0 commit comments